* [PATCH] firmware: dmi_scan: avoid printing error on non-efi systems
@ 2018-02-01 8:08 Martin Hundebøll
2018-02-02 7:00 ` Jean Delvare
0 siblings, 1 reply; 3+ messages in thread
From: Martin Hundebøll @ 2018-02-01 8:08 UTC (permalink / raw)
To: Jean Delvare, linux-kernel; +Cc: Martin Hundebøll
dmi_init() rightfully checks if dmi is available at all, and errors out
if not. This leads to harmless errors being printed during boot on
non-efi systems, even when these are booted quietly.
Avoid this error-print by returning directly from dmi_init() if dmi
isn't available, instead of jumping to the err-label.
Signed-off-by: Martin Hundebøll <mnhu@prevas.dk>
---
drivers/firmware/dmi_scan.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
index 783041964439..86c5e0625a08 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
@@ -715,10 +715,8 @@ static int __init dmi_init(void)
u8 *dmi_table;
int ret = -ENOMEM;
- if (!dmi_available) {
- ret = -ENODATA;
- goto err;
- }
+ if (!dmi_available)
+ return -ENODATA;
/*
* Set up dmi directory at /sys/firmware/dmi. This entry should stay
--
2.16.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] firmware: dmi_scan: avoid printing error on non-efi systems
2018-02-01 8:08 [PATCH] firmware: dmi_scan: avoid printing error on non-efi systems Martin Hundebøll
@ 2018-02-02 7:00 ` Jean Delvare
2018-02-02 10:51 ` Martin Hundebøll
0 siblings, 1 reply; 3+ messages in thread
From: Jean Delvare @ 2018-02-02 7:00 UTC (permalink / raw)
To: Martin Hundebøll; +Cc: linux-kernel, Ard Biesheuvel
Hi Martin,
On Thu, 1 Feb 2018 09:08:05 +0100, Martin Hundebøll wrote:
> dmi_init() rightfully checks if dmi is available at all, and errors out
> if not. This leads to harmless errors being printed during boot on
> non-efi systems, even when these are booted quietly.
>
> Avoid this error-print by returning directly from dmi_init() if dmi
> isn't available, instead of jumping to the err-label.
>
> Signed-off-by: Martin Hundebøll <mnhu@prevas.dk>
> ---
> drivers/firmware/dmi_scan.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
> index 783041964439..86c5e0625a08 100644
> --- a/drivers/firmware/dmi_scan.c
> +++ b/drivers/firmware/dmi_scan.c
> @@ -715,10 +715,8 @@ static int __init dmi_init(void)
> u8 *dmi_table;
> int ret = -ENOMEM;
>
> - if (!dmi_available) {
> - ret = -ENODATA;
> - goto err;
> - }
> + if (!dmi_available)
> + return -ENODATA;
>
> /*
> * Set up dmi directory at /sys/firmware/dmi. This entry should stay
I already have a similar patch by Ard Biesheuvel in my dmi tree:
http://jdelvare.nerim.net/devel/linux/jdelvare-dmi/firmware-dmi-handle-missing-dmi-data-gracefully.patch
Does it work for you?
I'll send a pull request to Linus later today.
Thanks,
--
Jean Delvare
SUSE L3 Support
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] firmware: dmi_scan: avoid printing error on non-efi systems
2018-02-02 7:00 ` Jean Delvare
@ 2018-02-02 10:51 ` Martin Hundebøll
0 siblings, 0 replies; 3+ messages in thread
From: Martin Hundebøll @ 2018-02-02 10:51 UTC (permalink / raw)
To: Jean Delvare, Martin Hundebøll; +Cc: linux-kernel, Ard Biesheuvel
Hi,
Yeah, you can add my
Acked-by: Martin Hundebøll <mnhu@prevas.dk>
Thanks,
Martin
On February 2, 2018 8:00:27 AM GMT+01:00, Jean Delvare <jdelvare@suse.de> wrote:
>Hi Martin,
>
>On Thu, 1 Feb 2018 09:08:05 +0100, Martin Hundebøll wrote:
>> dmi_init() rightfully checks if dmi is available at all, and errors
>out
>> if not. This leads to harmless errors being printed during boot on
>> non-efi systems, even when these are booted quietly.
>>
>> Avoid this error-print by returning directly from dmi_init() if dmi
>> isn't available, instead of jumping to the err-label.
>>
>> Signed-off-by: Martin Hundebøll <mnhu@prevas.dk>
>> ---
>> drivers/firmware/dmi_scan.c | 6 ++----
>> 1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/firmware/dmi_scan.c
>b/drivers/firmware/dmi_scan.c
>> index 783041964439..86c5e0625a08 100644
>> --- a/drivers/firmware/dmi_scan.c
>> +++ b/drivers/firmware/dmi_scan.c
>> @@ -715,10 +715,8 @@ static int __init dmi_init(void)
>> u8 *dmi_table;
>> int ret = -ENOMEM;
>>
>> - if (!dmi_available) {
>> - ret = -ENODATA;
>> - goto err;
>> - }
>> + if (!dmi_available)
>> + return -ENODATA;
>>
>> /*
>> * Set up dmi directory at /sys/firmware/dmi. This entry should
>stay
>
>I already have a similar patch by Ard Biesheuvel in my dmi tree:
>
>http://jdelvare.nerim.net/devel/linux/jdelvare-dmi/firmware-dmi-handle-missing-dmi-data-gracefully.patch
>
>Does it work for you?
>
>I'll send a pull request to Linus later today.
>
>Thanks,
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-02 10:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-01 8:08 [PATCH] firmware: dmi_scan: avoid printing error on non-efi systems Martin Hundebøll
2018-02-02 7:00 ` Jean Delvare
2018-02-02 10:51 ` Martin Hundebøll
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox