* drivers/net/ethernet/meta/mpnic/mpnic_txrx.c:273:48: warning: '%u' directive output may be truncated writing between 1 and 10 bytes into a region of size between 6 and 21
@ 2026-10-25 4:33 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-25 4:33 UTC (permalink / raw)
To: Daniel Zahka; +Cc: oe-kbuild-all, linux-kernel, Paolo Abeni
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 330517c63aa9b48227b6ab45f01003effac77ae4
commit: 3d4e4ad43aa455353067cf004d0618009ac39205 eth: mpnic: implement Tx queue allocation and cleanup
date: 4 weeks ago
config: arm64-randconfig-r2301-20261025 (https://download.01.org/0day-ci/archive/20261025/202610250507.qjcLBj0W-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 8.5.0
sparse: v0.6.5-rc1-1-gc4640450
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261025/202610250507.qjcLBj0W-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
| Fixes: 3d4e4ad43aa4 ("eth: mpnic: implement Tx queue allocation and cleanup")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610250507.qjcLBj0W-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/net/ethernet/meta/mpnic/mpnic_txrx.c: In function 'mpnic_alloc_napi_vectors':
>> drivers/net/ethernet/meta/mpnic/mpnic_txrx.c:273:48: warning: '%u' directive output may be truncated writing between 1 and 10 bytes into a region of size between 6 and 21 [-Wformat-truncation=]
snprintf(nv->name, sizeof(nv->name), "%s-TxRx-%u",
^~
drivers/net/ethernet/meta/mpnic/mpnic_txrx.c:273:39: note: directive argument in the range [0, 4294967294]
snprintf(nv->name, sizeof(nv->name), "%s-TxRx-%u",
^~~~~~~~~~~~
drivers/net/ethernet/meta/mpnic/mpnic_txrx.c:273:2: note: 'snprintf' output between 8 and 32 bytes into a destination of size 27
snprintf(nv->name, sizeof(nv->name), "%s-TxRx-%u",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mpn->netdev->name, idx);
~~~~~~~~~~~~~~~~~~~~~~~
vim +273 drivers/net/ethernet/meta/mpnic/mpnic_txrx.c
244
245 static int mpnic_alloc_napi_vector(struct mpnic_dev *mpd,
246 struct mpnic_net *mpn, unsigned int idx)
247 {
248 u32 __iomem *uc_addr = READ_ONCE(mpd->uc_addr0);
249 struct mpnic_napi_vector *nv;
250 int err;
251
252 /* Doorbells are plain pointers into the register window, they have
253 * no way of noticing that it went away.
254 */
255 if (!uc_addr)
256 return -EIO;
257
258 nv = kzalloc_flex(*nv, qt, 1);
259 if (!nv)
260 return -ENOMEM;
261
262 nv->txt_count = 1;
263 nv->mpd = mpd;
264 nv->dev = mpd->dev;
265 nv->v_idx = idx + MPNIC_NON_NAPI_VECTORS;
266
267 mpn->napi[idx] = nv;
268 netif_napi_add_config_locked(mpn->netdev, &nv->napi, mpnic_poll, idx);
269 netif_napi_set_irq_locked(&nv->napi,
270 pci_irq_vector(to_pci_dev(mpd->dev),
271 nv->v_idx));
272
> 273 snprintf(nv->name, sizeof(nv->name), "%s-TxRx-%u",
274 mpn->netdev->name, idx);
275
276 err = mpnic_request_irq(mpd, nv->v_idx, mpnic_msix_clean_rings, 0,
277 nv->name, nv);
278 if (err)
279 goto err_napi_del;
280
281 mpnic_ring_init(&nv->qt[0].sub0, &uc_addr[MPNIC_TWQ_TAIL(idx, 0)], idx);
282 mpnic_ring_init(&nv->qt[0].cmpl, &uc_addr[MPNIC_TCQ_HEAD(idx)], idx);
283 mpn->tx[idx] = &nv->qt[0].sub0;
284
285 return 0;
286
287 err_napi_del:
288 netif_napi_del_locked(&nv->napi);
289 mpn->napi[idx] = NULL;
290 kfree(nv);
291 return err;
292 }
293
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-25 4:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-25 4:33 drivers/net/ethernet/meta/mpnic/mpnic_txrx.c:273:48: warning: '%u' directive output may be truncated writing between 1 and 10 bytes into a region of size between 6 and 21 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®