Re: [PATCH net-next 06/10] can: rcar_canfd: Repurpose f_dcfg base for other registers
From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-06-19 01:38:28
Also in:
linux-can
From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-06-19 01:38:28
Also in:
linux-can
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?