lkml.org 
[lkml]   [2016]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv3 1/5] efi/runtime-wrappers: detect FW irq flag corruption
On Mon, Apr 25, 2016 at 04:59:22PM +0100, Matt Fleming wrote:
> On Mon, 25 Apr, at 03:27:35PM, Mark Rutland wrote:
> >
> > I have no strong preference so long as the code is correct.
> >
> > Another option is to get rid of the bool entirely:
> >
> > flags ^= cur_flags;
> > if (!WARN_ON(flags & ARCH_EFI_IRQ_FLAGS_MASK))
> > return;
>
> OK, let's do the following because we need flags to be preserved for
> printing,
>
> ---
>
> unsigned long cur_flags, mismatch;
>
> local_save_flags(cur_flags);
>
> mismatch = flags ^ cur_flags;
> if (!WARN_ON_ONCE(mismatch & ARCH_EFI_IRQ_FLAGS_MASK))
> return;
>

Sure; that looks good to me.

Cheers,
Mark.

\
 
 \ /
  Last update: 2016-04-25 18:21    [W:0.273 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site