Re: [PATCH v2] can: rcar_canfd: Drop unused macros

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

 



On 02/07/2025 at 21:05, Biju Das wrote:
> Drop unused macros from the rcar_canfd.c.
> 
> Reported-by: Vincent Mailhol <mailhol.vincent@xxxxxxxxxx>
> Closes: https://lore.kernel.org/all/7ff93ff9-f578-4be2-bdc6-5b09eab64fe6@xxxxxxxxxx/
> Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>

Reviewed-by: Vincent Mailhol <mailhol.vincent@xxxxxxxxxx>

> ---
> v1->v2:
>  * Dropped the Rb tags.
>  * Restored simple simple bit definitions as it serve as documentation.
>  * Restored register offsets will become anonymous gaps when the register
>    offsets are replaced by C structs.

When you refactor into the C structs, there is no problem to give a proper name
to a field which is unused. First, the struct clearly shows that this field is
part of a group whereas this relation is less obvious with the macros, second,
it takes little real estate: just one field name (less distraction when a human
parses the code compared to the macro) and finally, as a bonus point, you do not
get a W=2 warning spam.


Yours sincerely,
Vincent Mailhol





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux