[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75Vc1D3ut8x8_bVRSaEGy8EdUgfubxEsAbLEzJvNDx49f_g@mail.gmail.com>
Date: Sat, 14 Oct 2023 13:17:47 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Dan Williams <dan.j.williams@...el.com>
Cc: "Wilczynski, Michal" <michal.wilczynski@...el.com>,
nvdimm@...ts.linux.dev, linux-acpi@...r.kernel.org,
rafael@...nel.org, vishal.l.verma@...el.com, lenb@...nel.org,
dave.jiang@...el.com, ira.weiny@...el.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] ACPI: NFIT: Fix local use of devm_*()
On Sat, Oct 14, 2023 at 12:20 AM Dan Williams <dan.j.williams@...el.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
Powered by blists - more mailing lists