Thread (5 messages) 5 messages, 5 authors, 2025-06-21

Re: [PATCH] can: rcar_canfd: Describe channel-specific FD registers using C struct

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2025-06-19 11:56:54
Also in: linux-can, linux-renesas-soc

Hi Vincent,

On Thu, 19 Jun 2025 at 13:12, Vincent Mailhol
[off-list ref] wrote:
On 19/06/2025 at 19:13, Geert Uytterhoeven wrote:
quoted
The rcar_canfd_f_*() inline functions to obtain channel-specific CAN-FD
register offsets really describe a memory layout.  Hence replace them by
a C structure, to simplify the code, and reduce kernel size.

This also gets rid of warnings about unused rcar_canfd_f_*() inline
functions, which are reported by recent versions of clang.

Suggested-by: Vincent Mailhol <redacted>
Reported-by: Jakub Kicinski <kuba@kernel.org>
Closes: https://lore.kernel.org/20250618183827.5bebca8f@kernel.org (local)
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Fast-tracked because of the clang warnings.
Make sense.

@Jakub, OK for me if you want to directly pick this patch without going through
the linux-can tree.
quoted
Changes compared to Vincent's original suggestion
(https://lore.kernel.org/420d37b1-5648-4209-8d6f-1ac9d780eea2@wanadoo.fr (local)):
  - Move rcar_canfd_f to the old RCANFD_F_*() location,
  - Update RSCFDnCFDCmXXX comment.
  - Rename struct rcar_canfd_f to struct rcar_canfd_f,
                                           ^^^^^^^^^^^^
rcar_canfd_f_c ;)
Oops, right...
quoted
  - Rename cbase to fcbase,
  - Drop static_assert(),
  - Drop unused car_canfd_*_reg() functions.
  - Drop simple wrappers around {read,write}l(),
Acked-by: Vincent Mailhol <redacted>
Thanks!

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help