[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMZ6Rq+azM63cyLc+A3JLwVCgopOcu=LSGfmBQAbKrkJzmFYGg@mail.gmail.com>
Date: Thu, 19 Jun 2025 13:43:37 +0900
From: Vincent Mailhol <mailhol.vincent@...adoo.fr>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Marc Kleine-Budde <mkl@...gutronix.de>, Geert Uytterhoeven <geert+renesas@...der.be>, netdev@...r.kernel.org,
davem@...emloft.net, linux-can@...r.kernel.org, kernel@...gutronix.de
Subject: Re: [PATCH net-next 06/10] can: rcar_canfd: Repurpose f_dcfg base for
other registers
Hi Jakub,
On Thu. 19 Jun. 2025 at 10:38, Jakub Kicinski <kuba@...nel.org> wrote:
> 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?
I had a discussion with Geert on these functions here:
https://lore.kernel.org/linux-can/20250613-misty-amethyst-swine-7bd775-mkl@pengutronix.de/t/#mef5cb235313c5f0c4910d5571b052eb5e9ada92e
in which I made a suggestion to reword these. That suggestion would
actually resolve your concerns. Geert was OK with the suggestion but
we agreed to move on as-is and make those changes later on.
If temporarily having those static inline functions unused is not a
big blocker for you, can we just have this merged and wait for the
bigger refactor which is on Geert TODO’s list?
Yours sincerely,
Vincent Mailhol
Powered by blists - more mailing lists