[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250618183827.5bebca8f@kernel.org>
Date: Wed, 18 Jun 2025 18:38:27 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Marc Kleine-Budde <mkl@...gutronix.de>, Geert Uytterhoeven
<geert+renesas@...der.be>
Cc: netdev@...r.kernel.org, davem@...emloft.net, linux-can@...r.kernel.org,
kernel@...gutronix.de, Vincent Mailhol <mailhol.vincent@...adoo.fr>
Subject: Re: [PATCH net-next 06/10] can: rcar_canfd: Repurpose f_dcfg base
for other registers
On Wed, 18 Jun 2025 11:20:00 +0200 Marc Kleine-Budde wrote:
> +static inline unsigned int rcar_canfd_f_dcfg(struct rcar_canfd_global *gpriv,
> + unsigned int ch)
> +{
> + return gpriv->info->regs->coffset + 0x00 + 0x20 * ch;
> +}
> +
> +static inline unsigned int rcar_canfd_f_cfdcfg(struct rcar_canfd_global *gpriv,
> + unsigned int ch)
> +{
> + return gpriv->info->regs->coffset + 0x04 + 0x20 * ch;
> +}
> +
> +static inline unsigned int rcar_canfd_f_cfdctr(struct rcar_canfd_global *gpriv,
> + unsigned int ch)
> +{
> + return gpriv->info->regs->coffset + 0x08 + 0x20 * ch;
> +}
> +
> +static inline unsigned int rcar_canfd_f_cfdsts(struct rcar_canfd_global *gpriv,
> + unsigned int ch)
> +{
> + return gpriv->info->regs->coffset + 0x0c + 0x20 * ch;
> +}
> +
> +static inline unsigned int rcar_canfd_f_cfdcrc(struct rcar_canfd_global *gpriv,
> + unsigned int ch)
> +{
> + return gpriv->info->regs->coffset + 0x10 + 0x20 * ch;
> +}
clang is no longer fooled by static inline, it identifies that 4 out of
these functions are never called. I think one ends up getting used in
patch 10 (just looking at warning counts), but the other 3 remain dead
code. Geert, do you have a strong attachment to having all helpers
defined or can we trim this, please?
Powered by blists - more mailing lists