All of lore.kernel.org
 help / color / mirror / Atom feed
From: Punit Agrawal <punit.agrawal@arm.com>
To: Borislav Petkov <bp@suse.de>
Cc: linux-acpi@vger.kernel.org, lorenzo.pieralisi@arm.com,
	sudeep.holla@arm.com, linux-kernel@vger.kernel.org,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	James Morse <james.morse@arm.com>
Subject: Re: [PATCH v2] ACPI / APEI: Suppress message if HEST not present
Date: Tue, 29 Aug 2017 14:17:22 +0100	[thread overview]
Message-ID: <87pobeh5st.fsf@e105922-lin.cambridge.arm.com> (raw)
In-Reply-To: <20170829123815.2z6hoclakznophom@pd.tnic> (Borislav Petkov's message of "Tue, 29 Aug 2017 14:38:15 +0200")

Borislav Petkov <bp@suse.de> writes:

> On Wed, Aug 16, 2017 at 12:27:53PM +0100, Punit Agrawal wrote:
>> According to the ACPI specification, firmware is not required to provide
>> the Hardware Error Source Table (HEST). When HEST is not present, the
>> following superfluous message is printed to the kernel boot log -
>> 
>> [    3.460067] GHES: HEST is not enabled!
>> 
>> Extend hest_disable variable to track whether the firmware provides this
>> table and if it is not present skip any log output. The existing
>> behaviour is preserved in all other cases.
>> 
>> Suggested-by: Borislav Petkov <bp@suse.de>
>> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
>> Cc: Borislav Petkov <bp@suse.de>
>> Cc: James Morse <james.morse@arm.com>
>> ---
>>  drivers/acpi/apei/ghes.c |  4 ++--
>>  drivers/acpi/apei/hest.c | 13 +++++++------
>>  include/acpi/apei.h      |  8 +++++++-
>>  3 files changed, 16 insertions(+), 9 deletions(-)
>> 
>> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
>> index d661d452b238..f8685bcbeff2 100644
>> --- a/drivers/acpi/apei/ghes.c
>> +++ b/drivers/acpi/apei/ghes.c
>> @@ -1262,10 +1262,10 @@ static int __init ghes_init(void)
>>  {
>>  	int rc;
>>  
>> -	if (acpi_disabled)
>> +	if (acpi_disabled || hest_disable == HEST_NOT_FOUND)
>>  		return -ENODEV;
>>  
>> -	if (hest_disable) {
>> +	if (hest_disable == HEST_DISABLED) {
>>  		pr_info(GHES_PFX "HEST is not enabled!\n");
>>  		return -EINVAL;
>>  	}
>
> Yap, looks good.
>
> Just a minor nitpick: I'd additionally group the hest_disable checking
> in one switch-case, so that the code flow is obvious at a quick glance:
>
>         if (acpi_disabled)
>                 return -ENODEV;
>
>         switch (hest_disable) {
>         case HEST_NOT_FOUND:
>                 return -ENODEV;
>         case HEST_DISABLED:
>                 pr_info(GHES_PFX "HEST is not enabled!\n");
>                 return -EINVAL;
>         default:
>                 break;
>         }

I've picked this change and will send out an update shortly.

Thanks,
Punit

      reply	other threads:[~2017-08-29 13:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-16 11:27 [PATCH v2] ACPI / APEI: Suppress message if HEST not present Punit Agrawal
2017-08-29  9:03 ` Punit Agrawal
2017-08-29 12:38 ` Borislav Petkov
2017-08-29 13:17   ` Punit Agrawal [this message]

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=87pobeh5st.fsf@e105922-lin.cambridge.arm.com \
    --to=punit.agrawal@arm.com \
    --cc=bp@suse.de \
    --cc=james.morse@arm.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=rjw@rjwysocki.net \
    --cc=sudeep.holla@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.