On Thu, 20 Mar 2025 at 10:11, Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote: > The shift values in RCANFD_GAFLCFG_SETRNC are dictated by the field width: > - R-Car Gen4 packs 2 values in a 32-bit word, using a field width > of 16 bits, > - R-Car Gen3 packs up to 4 values in a 32-bit word, using a field > width of 8 bits. > > Add rnc_field_width variable to struct rcar_canfd_hw_info to handle this > difference and simplify the shift value in RCANFD_GAFLCFG_SETRNC macro by > using a formula (32 - (n % rnc_stride + 1) * rnc_field_width). > > Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx> > --- > v5->6: > * Replaced RCANFD_RNC_PER_REG macro with rnc_stride variable. > * Updated commit description > * Dropped the Rb tag. Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds