lkml.org 
[lkml]   [2021]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 2/4] pinctrl: renesas: Add RZ/G2L pin and gpio controller driver
On Mon, Jul 26, 2021 at 4:25 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Wed, Jul 21, 2021 at 9:16 PM Lad Prabhakar
> <prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:

...

> > +#define RZG2L_GPIO_PORT_GET_PINCNT(x) (((x) >> 28) & 0x7)
> > +#define RZG2L_GPIO_PORT_GET_INDEX(x) ((((x) & GENMASK(27, 20)) >> 20) & 0x7f)

It's funny one of them uses style "a" (no GENMASK() use), another
style "b" (GENMASK() is in use). I suggest being consistent: either
drop GENMASK() everywhere, or use them in all suitable places.

> > +#define RZG2L_SINGLE_PIN_GET_PORT(x) (((x) >> 24) & 0x7f)
> > +#define RZG2L_SINGLE_PIN_GET_BIT(x) ((((x) & GENMASK(23, 20)) >> 20) & 0x7)

Ditto.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2021-07-26 15:35    [W:2.202 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site