Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Eliav Farber <farbere@amazon.com>
Cc: <rafael@kernel.org>, <tony.luck@intel.com>, <bp@alien8.de>,
	<guohanjun@huawei.com>, <mchehab@kernel.org>,
	<xueshuai@linux.alibaba.com>, <lenb@kernel.org>,
	<laurent.pinchart@ideasonboard.com>, <linusw@kernel.org>,
	<brgl@kernel.org>, <orsonzhai@gmail.com>,
	<baolin.wang@linux.alibaba.com>, <zhang.lyra@gmail.com>,
	<dlechner@baylibre.com>, <nuno.sa@analog.com>, <andy@kernel.org>,
	<dmitry.torokhov@gmail.com>, <hansg@kernel.org>,
	<ilpo.jarvinen@linux.intel.com>, <W_Armin@gmx.de>,
	<ukleinek@kernel.org>, <fabio.m.de.francesco@linux.intel.com>,
	<kaihengf@nvidia.com>, <ankita@nvidia.com>, <leitao@debian.org>,
	<jason@os.amperecomputing.com>, <pedro.pbg@usp.br>,
	<paulmck@kernel.org>, <frederic@kernel.org>, <kees@kernel.org>,
	<linux-acpi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-gpio@vger.kernel.org>, <linux-pwm@vger.kernel.org>,
	<linux-iio@vger.kernel.org>, <linux-input@vger.kernel.org>,
	<platform-driver-x86@vger.kernel.org>
Subject: Re: [PATCH 08/12] ACPI: APEI: GHES: use devm_blocking_notifier_chain_register()
Date: Fri, 24 Jul 2026 01:50:43 +0100	[thread overview]
Message-ID: <20260724015043.37cecbfb@jic23-huawei> (raw)
In-Reply-To: <20260723175513.39849-4-farbere@amazon.com>

On Thu, 23 Jul 2026 17:55:09 +0000
Eliav Farber <farbere@amazon.com> wrote:

> Replace the blocking_notifier_chain_register() +
> devm_add_action_or_reset() pattern with a single call to
> devm_blocking_notifier_chain_register(), removing the
> ghes_vendor_record_notifier_destroy() callback.
> 
> Signed-off-by: Eliav Farber <farbere@amazon.com>
> ---
>  drivers/acpi/apei/ghes.c | 15 +++------------
>  1 file changed, 3 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
> index 3236a3ce79d6..3aa29dcd70da 100644
> --- a/drivers/acpi/apei/ghes.c
> +++ b/drivers/acpi/apei/ghes.c
> @@ -689,21 +689,12 @@ void ghes_unregister_vendor_record_noti	fier(struct notifier_block *nb)
>  }
>  EXPORT_SYMBOL_GPL(ghes_unregister_vendor_record_notifier);
>  
> -static void ghes_vendor_record_notifier_destroy(void *nb)
> -{
> -	ghes_unregister_vendor_record_notifier(nb);
> -}
> -
>  int devm_ghes_register_vendor_record_notifier(struct device *dev,
>  					      struct notifier_block *nb)
>  {
> -	int ret;
> -
> -	ret = ghes_register_vendor_record_notifier(nb);
> -	if (ret)
> -		return ret;
> -
> -	return devm_add_action_or_reset(dev, ghes_vendor_record_notifier_destroy, nb);
> +	return devm_blocking_notifier_chain_register(dev,
> +						     &vendor_record_notify_list,
> +						     nb);

Whilst correct, I'm less keen on this one because it looses the obvious connection
to the non devm form.  I suppose with the code being so near
to the non devm we can go with this. 

For that matter why do we have the non devm variants?  There are no users in tree.
Can we just rip that and the unregister given this is removing the only users?

Thanks,

Jonathan


>  }
>  EXPORT_SYMBOL_GPL(devm_ghes_register_vendor_record_notifier);
>  


  reply	other threads:[~2026-07-24  0:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23 17:55 [PATCH 05/12] gpio: adp5585: use devm_blocking_notifier_chain_register() Eliav Farber
2026-07-23 17:55 ` [PATCH 06/12] platform/x86: bitland-mifs-wmi: " Eliav Farber
2026-07-23 17:55 ` [PATCH 07/12] Input: adp5585: " Eliav Farber
2026-07-23 21:58   ` Dmitry Torokhov
2026-07-23 17:55 ` [PATCH 08/12] ACPI: APEI: GHES: " Eliav Farber
2026-07-24  0:50   ` Jonathan Cameron [this message]
2026-07-23 17:55 ` [PATCH 09/12] platform/x86: uniwill-wmi: " Eliav Farber
2026-07-24  7:47 ` [PATCH 05/12] gpio: adp5585: " Bartosz Golaszewski

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=20260724015043.37cecbfb@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=W_Armin@gmx.de \
    --cc=andy@kernel.org \
    --cc=ankita@nvidia.com \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=bp@alien8.de \
    --cc=brgl@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=fabio.m.de.francesco@linux.intel.com \
    --cc=farbere@amazon.com \
    --cc=frederic@kernel.org \
    --cc=guohanjun@huawei.com \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jason@os.amperecomputing.com \
    --cc=kaihengf@nvidia.com \
    --cc=kees@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=leitao@debian.org \
    --cc=lenb@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=orsonzhai@gmail.com \
    --cc=paulmck@kernel.org \
    --cc=pedro.pbg@usp.br \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=ukleinek@kernel.org \
    --cc=xueshuai@linux.alibaba.com \
    --cc=zhang.lyra@gmail.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