[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM4PR84MB1853A76B1374A4BEAD8A1E3982739@DM4PR84MB1853.NAMPRD84.PROD.OUTLOOK.COM>
Date: Wed, 24 Aug 2022 23:04:28 +0000
From: "Kani, Toshi" <toshi.kani@....com>
To: Jia He <justin.he@....com>, Len Brown <lenb@...nel.org>,
James Morse <james.morse@....com>,
Tony Luck <tony.luck@...el.com>,
Borislav Petkov <bp@...en8.de>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Robert Richter <rric@...nel.org>,
Robert Moore <robert.moore@...el.com>,
Qiuxu Zhuo <qiuxu.zhuo@...el.com>,
Yazen Ghannam <yazen.ghannam@....com>,
"Jonathan Corbet" <corbet@....net>,
Jan Luebbe <jlu@...gutronix.de>,
Khuong Dinh <khuong@...amperecomputing.com>
CC: Ard Biesheuvel <ardb@...nel.org>,
"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
"devel@...ica.org" <devel@...ica.org>,
"Rafael J . Wysocki" <rafael@...nel.org>,
Shuai Xue <xueshuai@...ux.alibaba.com>,
Jarkko Sakkinen <jarkko@...nel.org>,
"linux-efi@...r.kernel.org" <linux-efi@...r.kernel.org>,
"nd@....com" <nd@....com>, "Paul E. McKenney" <paulmck@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
"Neeraj Upadhyay" <quic_neeraju@...cinc.com>,
Randy Dunlap <rdunlap@...radead.org>,
Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
Muchun Song <songmuchun@...edance.com>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>
Subject: RE: [RESEND PATCH v3 5/9] EDAC: Don't load chipset-specific edac
drivers when ghes_edac is preferred
On Monday, August 22, 2022 9:41 AM, Jia He wrote:
> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
> index e17e0ee8f842..327386f3cf33 100644
> --- a/drivers/acpi/apei/ghes.c
> +++ b/drivers/acpi/apei/ghes.c
> @@ -1537,16 +1537,25 @@ static struct acpi_platform_list plat_list[] = {
> { } /* End */
> };
>
> -struct list_head *ghes_get_devices(void)
> +bool ghes_edac_preferred(void)
> {
> int idx = -1;
>
> if (IS_ENABLED(CONFIG_X86)) {
> idx = acpi_match_platform_list(plat_list);
> if (idx < 0 && !ghes_edac_force)
> - return NULL;
> + return false;
> }
>
> + return true;
> +}
> +EXPORT_SYMBOL_GPL(ghes_edac_preferred);
> +
> +struct list_head *ghes_get_devices(void)
> +{
> + if (!ghes_edac_preferred())
> + return NULL;
> +
> return &ghes_devs;
> }
ghes_get_devices() changing multiple times in the series is
confusing to me. Can you simply introduce ghes_get_devices()
and ghes_preferred() in the right state in a patch? Perhaps,
patch #2, #5, #6 can collapse to introduce the two funcs?
The rest of patch #5 adding the call to ghes_edac_preferred()
into other edac drivers can remain as a separate patch.
Toshi
Powered by blists - more mailing lists