lkml.org 
[lkml]   [2021]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC PATCH 4/8] x86/power: Restore Key Locker internal key from the ACPI S3/4 sleep states
Date
On Jan 28, 2021, at 02:34, Rafael J. Wysocki <rafael@kernel.org> wrote:
> On Wed, Dec 16, 2020 at 6:47 PM Chang S. Bae <chang.seok.bae@intel.com> wrote:
>>
>> + keybackup_status = read_keylocker_backup_status();
>> + if (!(keybackup_status & BIT(0))) {
>> + pr_err("x86/keylocker: internal key restoration failed with %s\n",
>> + (keybackup_status & BIT(2)) ? "read error" : "invalid status");
>> + WARN_ON(1);
>> + goto disable_keylocker;
>> + }
>
> The above conditional could be consolidated a bit by using WARN():
>
> if (WARN(!(keybackup_status & BIT(0)), "x86/keylocker: internal key
> restoration failed with %s\n",
> (keybackup_status & BIT(2)) ? "read error" : "invalid status")
> goto disable_keylocker;
>
> Apart from this the patch LGTM.

Thanks for the review! I will make this change on my next revision.

Chang
\
 
 \ /
  Last update: 2021-01-28 17:13    [W:0.069 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site