lkml.org 
[lkml]   [2023]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 1/2] gpio: tps65219: add GPIO support for TPS65219 PMIC
On Mon, May 29, 2023 at 6:21 PM jerome Neanne <jneanne@baylibre.com> wrote:
> On 26/05/2023 20:15, andy.shevchenko@gmail.com wrote:

...

> > Missing bits.h
> >
>
> Thanks for your review.Just to be sure on this particular point:
> Your recommendation here it to include explicitly bits.h.
>
> I can see BIT_MASK(n) defined in linux/bits.h
> BIT(n) is defined in vdso/bits.h
> From what I can see, BIT(n) is broadly used across kernel but
> BIT_MASK(n) sounds to be the Linux strict way...
>
> In current version I'm using BIT(n) macro not BIT_MASK(n).
> Do you recommend to replace every BIT(n) currently used with BIT_MASK(n)?

The semantics (if you look into implementations of those two) are different.

BIT() is for a single word (your case), while BIT_MASK() is for an
array of words.

* word in case of Linux kernel means element of unsigned long type.

> Sorry for asking dumb questions. Just trying to make sure I
> correctly/fully understand your feedback... And do it all right for the
> next iteration.

No problem.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2023-05-29 20:18    [W:0.387 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site