From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: "Wilczynski, Michal" <michal.wilczynski@intel.com>,
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
Subject: Re: [PATCH v2] ACPI: NFIT: Fix local use of devm_*()
Date: Sat, 14 Oct 2023 13:17:47 +0300 [thread overview]
Message-ID: <CAHp75Vc1D3ut8x8_bVRSaEGy8EdUgfubxEsAbLEzJvNDx49f_g@mail.gmail.com> (raw)
In-Reply-To: <6529b493cc785_5c0d2947d@dwillia2-mobl3.amr.corp.intel.com.notmuch>
On Sat, Oct 14, 2023 at 12:20 AM Dan Williams <dan.j.williams@intel.com> 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."
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2023-10-14 10:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 8:57 [PATCH v2] ACPI: NFIT: Fix local use of devm_*() Michal Wilczynski
2023-10-13 16:38 ` Dan Williams
2023-10-13 17:00 ` Wilczynski, Michal
2023-10-13 17:05 ` Dan Williams
2023-10-13 17:18 ` Wilczynski, Michal
2023-10-13 21:20 ` Dan Williams
2023-10-14 10:17 ` Andy Shevchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHp75Vc1D3ut8x8_bVRSaEGy8EdUgfubxEsAbLEzJvNDx49f_g@mail.gmail.com \
--to=andy.shevchenko@gmail.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=ira.weiny@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.wilczynski@intel.com \
--cc=nvdimm@lists.linux.dev \
--cc=rafael@kernel.org \
--cc=vishal.l.verma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).