From: Cristian Marussi <cristian.marussi@arm.com>
To: Borislav Petkov <bp@alien8.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v0 06/42] firmware: Check notifier registration return value
Date: Fri, 12 Nov 2021 18:43:32 +0000 [thread overview]
Message-ID: <20211112184332.GC6655@e120937-lin> (raw)
In-Reply-To: <20211108101157.15189-7-bp@alien8.de>
On Mon, Nov 08, 2021 at 11:11:21AM +0100, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
>
> Avoid homegrown notifier registration checks.
>
> No functional changes.
>
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Cc: linux-arm-kernel@lists.infradead.org
> ---
Hi Borislav,
same observations I made on ccree patch in this series holds here too.
Moreover you should use get_maintainer.pl script to properly Cc people
(reviewers/maintainers) beside mailing lists (I saw this by chance...):
as an additional note this patch also merges together two fixes for 2
completely different things (it should be split).
But, anyway, most of all, as said for ccree, I don't see the reason for
these kind of fixes given the internals of notifier core.
Thanks,
Cristian
> drivers/firmware/arm_scmi/notify.c | 3 ++-
> drivers/firmware/google/gsmi.c | 6 ++++--
> 2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/firmware/arm_scmi/notify.c b/drivers/firmware/arm_scmi/notify.c
> index 0efd20cd9d69..f4c42ac00c63 100644
> --- a/drivers/firmware/arm_scmi/notify.c
> +++ b/drivers/firmware/arm_scmi/notify.c
> @@ -1358,7 +1358,8 @@ static int scmi_notifier_register(const struct scmi_handle *handle,
> if (!hndl)
> return -EINVAL;
>
> - blocking_notifier_chain_register(&hndl->chain, nb);
> + if (blocking_notifier_chain_register(&hndl->chain, nb))
> + pr_warn("SCMI notifier already registered\n");
>
> /* Enable events for not pending handlers */
> if (!IS_HNDL_PENDING(hndl)) {
> diff --git a/drivers/firmware/google/gsmi.c b/drivers/firmware/google/gsmi.c
> index adaa492c3d2d..a658e7c106c3 100644
> --- a/drivers/firmware/google/gsmi.c
> +++ b/drivers/firmware/google/gsmi.c
> @@ -1030,8 +1030,10 @@ static __init int gsmi_init(void)
>
> register_reboot_notifier(&gsmi_reboot_notifier);
> register_die_notifier(&gsmi_die_notifier);
> - atomic_notifier_chain_register(&panic_notifier_list,
> - &gsmi_panic_notifier);
> +
> + if (atomic_notifier_chain_register(&panic_notifier_list,
> + &gsmi_panic_notifier))
> + pr_warn("gsmi panic notifier already registered\n");
>
> printk(KERN_INFO "gsmi version " DRIVER_VERSION " loaded\n");
>
> --
> 2.29.2
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-11-12 18:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20211108101157.15189-1-bp@alien8.de>
2021-11-08 10:11 ` [PATCH v0 06/42] firmware: Check notifier registration return value Borislav Petkov
2021-11-12 18:43 ` Cristian Marussi [this message]
2021-11-08 10:11 ` [PATCH v0 29/42] arm64: " Borislav Petkov
2021-11-08 10:11 ` [PATCH v0 42/42] notifier: Return an error when callback is already registered Borislav Petkov
2021-11-08 14:07 ` Geert Uytterhoeven
2021-11-08 14:21 ` Borislav Petkov
2021-11-08 15:25 ` Geert Uytterhoeven
2021-11-08 15:58 ` Borislav Petkov
2021-11-08 16:12 ` Geert Uytterhoeven
2021-11-08 16:21 ` Borislav Petkov
2021-11-08 20:59 ` Alan Stern
2021-11-08 21:18 ` Borislav Petkov
2021-11-08 10:19 ` [PATCH v0 00/42] notifiers: " Borislav Petkov
2021-11-08 14:17 ` Alan Stern
2021-11-08 14:24 ` Borislav Petkov
2021-11-08 14:35 ` Borislav Petkov
2021-11-08 16:23 ` Steven Rostedt
2021-11-08 16:29 ` Borislav Petkov
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=20211112184332.GC6655@e120937-lin \
--to=cristian.marussi@arm.com \
--cc=bp@alien8.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
/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