lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <23dbf1ed-543c-4765-91a6-b54db2d49150@wanadoo.fr>
Date: Wed, 2 Jul 2025 21:22:56 +0900
From: Vincent Mailhol <mailhol.vincent@...adoo.fr>
To: Biju Das <biju.das.jz@...renesas.com>,
 Marc Kleine-Budde <mkl@...gutronix.de>,
 Geert Uytterhoeven <geert+renesas@...der.be>
Cc: linux-can@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
 linux-kernel@...r.kernel.org,
 Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@...renesas.com>,
 Biju Das <biju.das.au@...il.com>, Magnus Damm <magnus.damm@...il.com>
Subject: Re: [PATCH v2] can: rcar_canfd: Drop unused macros

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

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

> ---
> 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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ