From: Jean Delvare <jdelvare@suse.de>
To: "Martin Hundebøll" <mnhu@prevas.dk>
Cc: <linux-kernel@vger.kernel.org>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: Re: [PATCH] firmware: dmi_scan: avoid printing error on non-efi systems
Date: Fri, 2 Feb 2018 08:00:27 +0100 [thread overview]
Message-ID: <20180202080027.36a7f102@endymion> (raw)
In-Reply-To: <20180201080805.8076-1-mnhu@prevas.dk>
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
next prev parent reply other threads:[~2018-02-02 9:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2018-02-02 10:51 ` Martin Hundebøll
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=20180202080027.36a7f102@endymion \
--to=jdelvare@suse.de \
--cc=ard.biesheuvel@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mnhu@prevas.dk \
/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