Re: [PATCH] cs5535: use BIT() macro for defining bit-flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 7, 2019 at 2:30 PM Amol Surati <suratiamol@xxxxxxxxx> wrote:
>
> The BIT() macro is available for defining the required bit-flags.

Shouldn't bits.h be added?

> Since it operates on an unsigned value and expands to an unsigned result,
> using it, instead of an expression like (1 << x), also fixes the problem
> of shifting a signed 32-bit value by 31 bits. (e.g. 1 << 31. See
> CS5536_GPIOM7_PME_FLAG and CS5536_GPIOM7_PME_EN).

What problem?
You need to describe that (UB by the standard, though gcc works fine,
I never heard it utilizes such).

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux