Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1459758rdg; Sat, 14 Oct 2023 03:18:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEpwIARBDeMJohPLZeKU8XkqCK6mK1Ox9Jlhku2LUCD2YkrBV95qkfLGV167ZeZBulAAdu0 X-Received: by 2002:a25:5f50:0:b0:d9a:da78:5272 with SMTP id h16-20020a255f50000000b00d9ada785272mr6258552ybm.33.1697278714246; Sat, 14 Oct 2023 03:18:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697278714; cv=none; d=google.com; s=arc-20160816; b=eEg8NId+8scZUiWWn1J8NL31SmIAgjm6pMzy3X9iLtu1/FcDP4iFlw5Mear3qwhfF3 bR0x7bsKSCYWJ8X0HUWDkFpl5D7opb6+KV54UBh8F5lqlvzdy6+mpIeQ/qsUEJ1ecB4k NiXJwOaivDzyb2kpWOrHAyPcyzNTL/cyOo1gFpUBswexrSXe9OyfHI2dhVy6mA+AFQzF 9ahKdFGKibP+p+Nogo6FGSbgx3hLIdAEYyt+W5YoG6pdAvJhhimQM5IyGrgUAtuW+2s1 jMFAsXzyiUudnicyEuUrxD+KBSSAaUBxAvnWcZydtQAIN/7zoG7KL6ua4r6ngZ78igEu FC0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=aD2RALeAHf4EyVH0V54MgAy7EPDrxXSYL/VcpZrTBWo=; fh=Fj8Rm71JzZvcHBaumOvS4rkl/v2GE00LtGrSMRDCdyE=; b=WoZpAWWLnLpqba72RXAZ6excVDjfH3jpURe6fpqeDG6QwfnTLBbi415irky8XAN6PX eI5wWbdbq28qhWsw86jJmYAwHHAUeSYogfRl7XqQbO+c0swgGr/IOX7a3iX08XUIXfhx DzpIW9um1jD3qzoOSWUMV30EBMQEwzLxnV/5BVhRqFX8UPSlbGI+T2L2sBirnT7K4yEx KqDP9t0AwpyHtWTyl/LN4ksQfV2Du0/41aUY9XiXIijQmZJPdCkH9kEcKx8/9fZgPFet cN65gaWIrgQqSotdcY7In42/bZb+bt72pfZ1NiLdvnGRoK3gLXhLQj3l14glPf8z8SbT K67A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=N38LBgat; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id s4-20020a056a00194400b0068e2566615esi19447685pfk.379.2023.10.14.03.18.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Oct 2023 03:18:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=N38LBgat; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 44640803D70D; Sat, 14 Oct 2023 03:18:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233052AbjJNKS0 (ORCPT + 99 others); Sat, 14 Oct 2023 06:18:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232957AbjJNKSZ (ORCPT ); Sat, 14 Oct 2023 06:18:25 -0400 Received: from mail-yb1-xb2a.google.com (mail-yb1-xb2a.google.com [IPv6:2607:f8b0:4864:20::b2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CB44A2; Sat, 14 Oct 2023 03:18:24 -0700 (PDT) Received: by mail-yb1-xb2a.google.com with SMTP id 3f1490d57ef6-d9ad90e1038so2648912276.3; Sat, 14 Oct 2023 03:18:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697278703; x=1697883503; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=aD2RALeAHf4EyVH0V54MgAy7EPDrxXSYL/VcpZrTBWo=; b=N38LBgatJk6IuNEKMmbtU+ymfCXfkKDweIKbr13lb2FtLKLP4DMppnk5jMrtLhGkBB su3qWgoJ04n6AFsNsIChY+heoZPzLXND9dlHTB26IyBgD13SgJmZboacI+WzZk8kBVm0 ufZCbiTJ9whCh6t7HBUg0G3rObrWv/Bht1QGVItAw+0eogvGnkDWRXemAjLSKmE2+7Ll 01t8or8ErRpyD/aBrQ4JlbbaOP2LYtZq9eYJX7XElT0deDLfG8lxieiVHMw56aqP5Y0o I+4lQ30Ok1fSOwtypUkKJ4QTQl+OfeMTyvw75CynuYsBzOqZZ4Dxx9Mirtd/OTE9QZG8 CXkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697278703; x=1697883503; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aD2RALeAHf4EyVH0V54MgAy7EPDrxXSYL/VcpZrTBWo=; b=StkNzfj8isba8rwM2k8v//UBqU3JPPtApL5MJ4HRbWcqwoFdW8Cut+yVckgZUqJDXf zqwCn2eM/HP5DHauWmEW3gfClLmr3YmDvSM59/mwhZT2Ir6QoqDkZuvdlGrvpE4EtDQM M1AvqMpI/wNzJ3k5ADvq2z6EWiGhVKjzg8r3ORnnxKZF8ryEOZF6VTJoVypvsn99oiIn cXaKEX9Q1Mhf4Y1qRyLsozeZAYBco3SN8F5Vj7iwA6TuCvEVFXH6SaBzrU6o2XmssOXc TPKWgzJ1qDr23+ofhTFLUePPef/2Kl8pkmPxa8VAcRXuhx3lgJePQzyWHd8CJJtMi6nO TgyQ== X-Gm-Message-State: AOJu0Yzy+C345uTdnzsDhzLmNAIsRc2XsHV+gEjgU2AtsxxNm1d1eCi6 /fdesKOIv0Zfbh76T0O+Pkicpf8sOvAetlJ+UWU= X-Received: by 2002:a25:db10:0:b0:d9a:b9fb:e6f9 with SMTP id g16-20020a25db10000000b00d9ab9fbe6f9mr6339988ybf.10.1697278703561; Sat, 14 Oct 2023 03:18:23 -0700 (PDT) MIME-Version: 1.0 References: <20231013085722.3031537-1-michal.wilczynski@intel.com> <6529727e18964_f879294ea@dwillia2-mobl3.amr.corp.intel.com.notmuch> <652978deafdf8_f8792944c@dwillia2-mobl3.amr.corp.intel.com.notmuch> <1c2117f1-2d22-4d08-bd9f-8c821d4a1757@intel.com> <6529b493cc785_5c0d2947d@dwillia2-mobl3.amr.corp.intel.com.notmuch> In-Reply-To: <6529b493cc785_5c0d2947d@dwillia2-mobl3.amr.corp.intel.com.notmuch> From: Andy Shevchenko Date: Sat, 14 Oct 2023 13:17:47 +0300 Message-ID: Subject: Re: [PATCH v2] ACPI: NFIT: Fix local use of devm_*() To: Dan Williams Cc: "Wilczynski, Michal" , nvdimm@lists.linux.dev, linux-acpi@vger.kernel.org, rafael@kernel.org, vishal.l.verma@intel.com, lenb@kernel.org, dave.jiang@intel.com, ira.weiny@intel.com, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sat, 14 Oct 2023 03:18:32 -0700 (PDT) On Sat, Oct 14, 2023 at 12:20=E2=80=AFAM Dan Williams wrote: > Wilczynski, Michal wrote: ... > "The new cleanup.h facilities that arrived in v6.5-rc1 can replace the > the usage of devm semantics in acpi_nfit_init_interleave_set(). That > routine appears to only be using devm to avoid goto statements. The new > __free() annotation at variable declaration time can achieve the same > effect more efficiently. > > There is no end user visible side effects of this patch, I was motivated > to send this cleanup to practice using the new helpers." The end-user side effect (educational and not run-time) is that: "One should really be careful about the scope of the devm_*() APIs and use of them just for the sake of the RAII replacement is not the best idea, while code is still working. Hence it gives a better example for whoever tries to use this code for educational purposes." --=20 With Best Regards, Andy Shevchenko