All of lore.kernel.org
 help / color / mirror / Atom feed
* [wireless-testsing2:master 6/6] drivers/net/ethernet/pensando/ionic/ionic_main.c:433:2: warning: 'strncpy' output truncated copying 31 bytes from a string of length 33
@ 2020-05-20  7:41 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-05-20  7:41 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4544 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-testing.git master
head:   3cbd2cabbd29fd3883bfd479b44e7059139fe2ea
commit: 3cbd2cabbd29fd3883bfd479b44e7059139fe2ea [6/6] Add localversion to identify builds from this tree
config: ia64-randconfig-r005-20200519 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 3cbd2cabbd29fd3883bfd479b44e7059139fe2ea
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

drivers/net/ethernet/pensando/ionic/ionic_main.c: In function 'ionic_identify':
>> drivers/net/ethernet/pensando/ionic/ionic_main.c:433:2: warning: 'strncpy' output truncated copying 31 bytes from a string of length 33 [-Wstringop-truncation]
433 |  strncpy(ident->drv.driver_ver_str, UTS_RELEASE,
|  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
434 |   sizeof(ident->drv.driver_ver_str) - 1);
|   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/strncpy +433 drivers/net/ethernet/pensando/ionic/ionic_main.c

fbfb8031533c92 Shannon Nelson 2019-09-03  422  
fbfb8031533c92 Shannon Nelson 2019-09-03  423  int ionic_identify(struct ionic *ionic)
fbfb8031533c92 Shannon Nelson 2019-09-03  424  {
fbfb8031533c92 Shannon Nelson 2019-09-03  425  	struct ionic_identity *ident = &ionic->ident;
fbfb8031533c92 Shannon Nelson 2019-09-03  426  	struct ionic_dev *idev = &ionic->idev;
fbfb8031533c92 Shannon Nelson 2019-09-03  427  	size_t sz;
fbfb8031533c92 Shannon Nelson 2019-09-03  428  	int err;
fbfb8031533c92 Shannon Nelson 2019-09-03  429  
fbfb8031533c92 Shannon Nelson 2019-09-03  430  	memset(ident, 0, sizeof(*ident));
fbfb8031533c92 Shannon Nelson 2019-09-03  431  
fbfb8031533c92 Shannon Nelson 2019-09-03  432  	ident->drv.os_type = cpu_to_le32(IONIC_OS_TYPE_LINUX);
1fcbebf115d9ce Shannon Nelson 2020-03-06 @433  	strncpy(ident->drv.driver_ver_str, UTS_RELEASE,
fbfb8031533c92 Shannon Nelson 2019-09-03  434  		sizeof(ident->drv.driver_ver_str) - 1);
fbfb8031533c92 Shannon Nelson 2019-09-03  435  
fbfb8031533c92 Shannon Nelson 2019-09-03  436  	mutex_lock(&ionic->dev_cmd_lock);
fbfb8031533c92 Shannon Nelson 2019-09-03  437  
fbfb8031533c92 Shannon Nelson 2019-09-03  438  	sz = min(sizeof(ident->drv), sizeof(idev->dev_cmd_regs->data));
fbfb8031533c92 Shannon Nelson 2019-09-03  439  	memcpy_toio(&idev->dev_cmd_regs->data, &ident->drv, sz);
fbfb8031533c92 Shannon Nelson 2019-09-03  440  
fbfb8031533c92 Shannon Nelson 2019-09-03  441  	ionic_dev_cmd_identify(idev, IONIC_IDENTITY_VERSION_1);
fbfb8031533c92 Shannon Nelson 2019-09-03  442  	err = ionic_dev_cmd_wait(ionic, DEVCMD_TIMEOUT);
fbfb8031533c92 Shannon Nelson 2019-09-03  443  	if (!err) {
fbfb8031533c92 Shannon Nelson 2019-09-03  444  		sz = min(sizeof(ident->dev), sizeof(idev->dev_cmd_regs->data));
fbfb8031533c92 Shannon Nelson 2019-09-03  445  		memcpy_fromio(&ident->dev, &idev->dev_cmd_regs->data, sz);
fbfb8031533c92 Shannon Nelson 2019-09-03  446  	}
fbfb8031533c92 Shannon Nelson 2019-09-03  447  
fbfb8031533c92 Shannon Nelson 2019-09-03  448  	mutex_unlock(&ionic->dev_cmd_lock);
fbfb8031533c92 Shannon Nelson 2019-09-03  449  
fbfb8031533c92 Shannon Nelson 2019-09-03  450  	if (err)
fbfb8031533c92 Shannon Nelson 2019-09-03  451  		goto err_out_unmap;
fbfb8031533c92 Shannon Nelson 2019-09-03  452  
fbfb8031533c92 Shannon Nelson 2019-09-03  453  	ionic_debugfs_add_ident(ionic);
fbfb8031533c92 Shannon Nelson 2019-09-03  454  
fbfb8031533c92 Shannon Nelson 2019-09-03  455  	return 0;
fbfb8031533c92 Shannon Nelson 2019-09-03  456  
fbfb8031533c92 Shannon Nelson 2019-09-03  457  err_out_unmap:
fbfb8031533c92 Shannon Nelson 2019-09-03  458  	return err;
fbfb8031533c92 Shannon Nelson 2019-09-03  459  }
fbfb8031533c92 Shannon Nelson 2019-09-03  460  

:::::: The code at line 433 was first introduced by commit
:::::: 1fcbebf115d9ce077c2ba5ecfb521cc1eedcb467 ionic: drop ethtool driver version

:::::: TO: Shannon Nelson <snelson@pensando.io>
:::::: CC: David S. Miller <davem@davemloft.net>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30176 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-20  7:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-20  7:41 [wireless-testsing2:master 6/6] drivers/net/ethernet/pensando/ionic/ionic_main.c:433:2: warning: 'strncpy' output truncated copying 31 bytes from a string of length 33 kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.