Re: [PATCH v5 3/4] net: can: rockchip: add can for RK3576 Soc

kernel test robot
2025-05-24T13:58:31Z

Hi Elaine,

kernel test robot noticed the following build warnings:

[auto build test WARNING on mkl-can-next/testing]
[also build test WARNING on robh/for-next linus/master v6.15-rc7 next-20250523]
[cannot apply to rockchip/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Elaine-Zhang/dt-bindings-can-rockchip_canfd-add-rk3576-CAN-FD-controller/20250523-211340
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git testing
patch link: https://lore.kernel.org/r/20250523075422.4010083-4-zhangqing%40rock-chips.com
patch subject: [PATCH v5 3/4] net: can: rockchip: add can for RK3576 Soc
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20250524/202505242132.Mau7vNde-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250524/202505242132.Mau7vNde-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505242132.Mau7vNde-lkp@intel.com/

All warnings (new ones prefixed by >>):

drivers/net/can/rockchip/rockchip_canfd-tx.c: In function 'rkcanfd_handle_rk3576_tx_int':
>> drivers/net/can/rockchip/rockchip_canfd-tx.c:173:25: warning: variable 'skb' set but not used [-Wunused-but-set-variable]
173 | struct sk_buff *skb;
| ^~~
In file included from drivers/net/can/rockchip/rockchip_canfd-tx.c:9:
drivers/net/can/rockchip/rockchip_canfd.h: At top level:
drivers/net/can/rockchip/rockchip_canfd.h:699:29: warning: 'priv' defined but not used [-Wunused-variable]
699 | static struct rkcanfd_priv *priv;
| ^~~~

vim +/skb +173 drivers/net/can/rockchip/rockchip_canfd-tx.c

168
169 int rkcanfd_handle_rk3576_tx_int(struct rkcanfd_priv *priv)
170 {
171 struct net_device_stats *stats = &priv->ndev->stats;
172 unsigned int tx_tail;
> 173 struct sk_buff *skb;
174 unsigned int frame_len = 0;
175
176 tx_tail = rkcanfd_get_tx_tail(priv);
177 skb = priv->can.echo_skb[tx_tail];
178
179 /* Manual handling of CAN Bus Error counters. See
180 * rkcanfd_get_corrected_berr_counter() for detailed
181 * explanation.
182 */
183 if (priv->bec.txerr)
184 priv->bec.txerr--;
185
186 stats->tx_bytes +=
187 can_rx_offload_get_echo_skb_queue_tail(&priv->offload,
188 tx_tail, &frame_len);
189 stats->tx_packets++;
190 WRITE_ONCE(priv->tx_tail, priv->tx_tail + 1);
191 netif_subqueue_completed_wake(priv->ndev, 0, 1, frame_len,
192 rkcanfd_get_effective_tx_free(priv),
193 RKCANFD_TX_START_THRESHOLD);
194 return 0;
195 }
196

--
0-DAY CI Kernel Test Service