tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 459341c4b4845b283c7a884e6a0dc4bd8cdb89e6 commit: 01e6e2075c432fde7fb5a66202b41bbd469de620 [21053/30000] Net: m1600: Add m1600-driver for nebula-matrix m1600 series smart NIC. config: x86_64-randconfig-075-20240323 (https://download.01.org/0day-ci/archive/20240323/202403231156.PXmnaRGK-lkp@i...) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240323/202403231156.PXmnaRGK-lkp@i...)
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/202403231156.PXmnaRGK-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/net/ethernet/nebula-matrix/m1600/debug.c:18:0: drivers/net/ethernet/nebula-matrix/m1600/ethtool.h:131:19: warning: 'nbl_priv_flags' defined but not used [-Wunused-const-variable=] static const char nbl_priv_flags[][ETH_GSTRING_LEN] = { ^~~~~~~~~~~~~~ drivers/net/ethernet/nebula-matrix/m1600/ethtool.h:116:19: warning: 'nbl_gstrings_test' defined but not used [-Wunused-const-variable=] static const char nbl_gstrings_test[][ETH_GSTRING_LEN] = { ^~~~~~~~~~~~~~~~~ drivers/net/ethernet/nebula-matrix/m1600/ethtool.h:57:39: warning: 'nbl_gstrings_stats' defined but not used [-Wunused-const-variable=] static const struct nbl_ethtool_stats nbl_gstrings_stats[] = { ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/nebula-matrix/m1600/ethtool.h:13:18: warning: 'nbl_regs_dump_list' defined but not used [-Wunused-const-variable=] static const u32 nbl_regs_dump_list[] = { ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/nebula-matrix/m1600/debug.c: In function 'nbl_debugfs_hw_init':
drivers/net/ethernet/nebula-matrix/m1600/debug.c:564:39: warning: '%d' directive output may be truncated writing between 1 and 10 bytes into a region of size 9 [-Wformat-truncation=]
snprintf(buf, sizeof(buf), "txring-%d", i); ^~ drivers/net/ethernet/nebula-matrix/m1600/debug.c:564:31: note: directive argument in the range [0, 2147483646] snprintf(buf, sizeof(buf), "txring-%d", i); ^~~~~~~~~~~ drivers/net/ethernet/nebula-matrix/m1600/debug.c:564:4: note: 'snprintf' output between 9 and 18 bytes into a destination of size 16 snprintf(buf, sizeof(buf), "txring-%d", i); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/nebula-matrix/m1600/debug.c:573:39: warning: '%d' directive output may be truncated writing between 1 and 10 bytes into a region of size 9 [-Wformat-truncation=] snprintf(buf, sizeof(buf), "rxring-%d", i); ^~ drivers/net/ethernet/nebula-matrix/m1600/debug.c:573:31: note: directive argument in the range [0, 2147483646] snprintf(buf, sizeof(buf), "rxring-%d", i); ^~~~~~~~~~~ drivers/net/ethernet/nebula-matrix/m1600/debug.c:573:4: note: 'snprintf' output between 9 and 18 bytes into a destination of size 16 snprintf(buf, sizeof(buf), "rxring-%d", i); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +564 drivers/net/ethernet/nebula-matrix/m1600/debug.c
534 535 /* function init and cleanup */ 536 void nbl_debugfs_hw_init(struct nbl_hw *hw) 537 { 538 int i; 539 char buf[16]; 540 struct nbl_adapter *adapter; 541 542 adapter = (struct nbl_adapter *)hw->back; 543 544 if (!nblx4_debug_root) 545 return; 546 547 snprintf(buf, sizeof(buf), "%04x:%02x:%02x.%x", 548 pci_domain_nr(adapter->pdev->bus), hw->bus, hw->devid, hw->function); 549 hw->nbl_debug_root = debugfs_create_dir(buf, nblx4_debug_root); 550 551 if (is_af(hw)) { 552 debugfs_create_file("dvn", 0444, 553 hw->nbl_debug_root, hw, &dvn_fops); 554 debugfs_create_file("uvn", 0644, 555 hw->nbl_debug_root, hw, &uvn_fops); 556 debugfs_create_file("nic-statistics", 0444, 557 hw->nbl_debug_root, hw, &nic_statistics_fops); 558 debugfs_create_file("tables", 0644, 559 hw->nbl_debug_root, hw, &tables_fops); 560 } 561 562 if (adapter->num_txq) { 563 for (i = 0; i < adapter->num_txq; i++) {
564 snprintf(buf, sizeof(buf), "txring-%d", i);
565 debugfs_create_file(buf, 0444, 566 hw->nbl_debug_root, 567 adapter->tx_rings[i], &ring_fops); 568 } 569 } 570 571 if (adapter->num_rxq) { 572 for (i = 0; i < adapter->num_rxq; i++) { 573 snprintf(buf, sizeof(buf), "rxring-%d", i); 574 debugfs_create_file(buf, 0444, 575 hw->nbl_debug_root, 576 adapter->rx_rings[i], &ring_fops); 577 } 578 } 579 580 debugfs_create_file("bar", 0444, hw->nbl_debug_root, hw, &bar_fops); 581 582 hw->debugfs_reg_bar = 0; 583 hw->debugfs_reg_offset = 0; 584 hw->debugfs_reg_length = 8; 585 debugfs_create_file("reg", 0444, hw->nbl_debug_root, hw, ®_fops); 586 } 587