lkml.org 
[lkml]   [2019]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 1/4] platform/x86: intel_pmc_ipc: Use BIT() macro
On Tue, Apr 09, 2019 at 10:07:35AM -0700, sathyanarayanan kuppuswamy wrote:
> On 4/9/19 4:25 AM, Andy Shevchenko wrote:
> > Use BIT() and BIT_MASK() macros for definitions.
> Looks good to me.

Thanks!

> > /* PMC register bit definitions */
> > /* PMC_CFG_REG bit masks */
> > -#define PMC_CFG_NO_REBOOT_MASK (1 << 4)
> > +#define PMC_CFG_NO_REBOOT_MASK BIT_MASK(4)
> > #define PMC_CFG_NO_REBOOT_EN (1 << 4)
> > #define PMC_CFG_NO_REBOOT_DIS (0 << 4)
> Do we need 0 << 4 ?

Yes, to explicitly show that this is a value for NO_REBOOT masked bit(s)
(single bit in this case).

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2019-04-09 19:40    [W:0.097 / U:5.992 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site