netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Shannon Nelson <shannon.nelson@amd.com>,
	brett.creeley@amd.com, davem@davemloft.net,
	netdev@vger.kernel.org, kuba@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, drivers@pensando.io,
	leon@kernel.org, jiri@resnulli.us, simon.horman@corigine.com
Subject: Re: [PATCH v10 net-next 14/14] pds_core: Kconfig and pds_core.rst
Date: Tue, 18 Apr 2023 11:56:03 +0800	[thread overview]
Message-ID: <202304181137.WaZTYyAa-lkp@intel.com> (raw)
In-Reply-To: <20230418003228.28234-15-shannon.nelson@amd.com>

Hi Shannon,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Shannon-Nelson/pds_core-initial-framework-for-pds_core-PF-driver/20230418-083612
patch link:    https://lore.kernel.org/r/20230418003228.28234-15-shannon.nelson%40amd.com
patch subject: [PATCH v10 net-next 14/14] pds_core: Kconfig and pds_core.rst
config: sparc-allyesconfig (https://download.01.org/0day-ci/archive/20230418/202304181137.WaZTYyAa-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/98284802ba918b756684dcf00cfa88bbab5cb498
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Shannon-Nelson/pds_core-initial-framework-for-pds_core-PF-driver/20230418-083612
        git checkout 98284802ba918b756684dcf00cfa88bbab5cb498
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash drivers/net/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304181137.WaZTYyAa-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/amd/pds_core/auxbus.c: In function 'pds_client_register':
>> drivers/net/ethernet/amd/pds_core/auxbus.c:30:9: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation]
      30 |         strncpy(cmd.client_reg.devname, devname,
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      31 |                 sizeof(cmd.client_reg.devname));
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/strncpy +30 drivers/net/ethernet/amd/pds_core/auxbus.c

de85ef78c6b4f6 Shannon Nelson 2023-04-17   8  
283e6c9307d7f4 Shannon Nelson 2023-04-17   9  /**
283e6c9307d7f4 Shannon Nelson 2023-04-17  10   * pds_client_register - Link the client to the firmware
283e6c9307d7f4 Shannon Nelson 2023-04-17  11   * @pf_pdev:	ptr to the PF driver struct
283e6c9307d7f4 Shannon Nelson 2023-04-17  12   * @devname:	name that includes service into, e.g. pds_core.vDPA
283e6c9307d7f4 Shannon Nelson 2023-04-17  13   *
283e6c9307d7f4 Shannon Nelson 2023-04-17  14   * Return: 0 on success, or
283e6c9307d7f4 Shannon Nelson 2023-04-17  15   *         negative for error
283e6c9307d7f4 Shannon Nelson 2023-04-17  16   */
283e6c9307d7f4 Shannon Nelson 2023-04-17  17  int pds_client_register(struct pci_dev *pf_pdev, char *devname)
283e6c9307d7f4 Shannon Nelson 2023-04-17  18  {
283e6c9307d7f4 Shannon Nelson 2023-04-17  19  	union pds_core_adminq_comp comp = {};
283e6c9307d7f4 Shannon Nelson 2023-04-17  20  	union pds_core_adminq_cmd cmd = {};
283e6c9307d7f4 Shannon Nelson 2023-04-17  21  	struct pdsc *pf;
283e6c9307d7f4 Shannon Nelson 2023-04-17  22  	int err;
283e6c9307d7f4 Shannon Nelson 2023-04-17  23  	u16 ci;
283e6c9307d7f4 Shannon Nelson 2023-04-17  24  
283e6c9307d7f4 Shannon Nelson 2023-04-17  25  	pf = pci_get_drvdata(pf_pdev);
283e6c9307d7f4 Shannon Nelson 2023-04-17  26  	if (pf->state)
283e6c9307d7f4 Shannon Nelson 2023-04-17  27  		return -ENXIO;
283e6c9307d7f4 Shannon Nelson 2023-04-17  28  
283e6c9307d7f4 Shannon Nelson 2023-04-17  29  	cmd.client_reg.opcode = PDS_AQ_CMD_CLIENT_REG;
283e6c9307d7f4 Shannon Nelson 2023-04-17 @30  	strncpy(cmd.client_reg.devname, devname,
283e6c9307d7f4 Shannon Nelson 2023-04-17  31  		sizeof(cmd.client_reg.devname));
283e6c9307d7f4 Shannon Nelson 2023-04-17  32  
283e6c9307d7f4 Shannon Nelson 2023-04-17  33  	err = pdsc_adminq_post(pf, &cmd, &comp, false);
283e6c9307d7f4 Shannon Nelson 2023-04-17  34  	if (err) {
283e6c9307d7f4 Shannon Nelson 2023-04-17  35  		dev_info(pf->dev, "register dev_name %s with DSC failed, status %d: %pe\n",
283e6c9307d7f4 Shannon Nelson 2023-04-17  36  			 devname, comp.status, ERR_PTR(err));
283e6c9307d7f4 Shannon Nelson 2023-04-17  37  		return err;
283e6c9307d7f4 Shannon Nelson 2023-04-17  38  	}
283e6c9307d7f4 Shannon Nelson 2023-04-17  39  
283e6c9307d7f4 Shannon Nelson 2023-04-17  40  	ci = le16_to_cpu(comp.client_reg.client_id);
283e6c9307d7f4 Shannon Nelson 2023-04-17  41  	if (!ci) {
283e6c9307d7f4 Shannon Nelson 2023-04-17  42  		dev_err(pf->dev, "%s: device returned null client_id\n",
283e6c9307d7f4 Shannon Nelson 2023-04-17  43  			__func__);
283e6c9307d7f4 Shannon Nelson 2023-04-17  44  		return -EIO;
283e6c9307d7f4 Shannon Nelson 2023-04-17  45  	}
283e6c9307d7f4 Shannon Nelson 2023-04-17  46  
283e6c9307d7f4 Shannon Nelson 2023-04-17  47  	dev_dbg(pf->dev, "%s: device returned client_id %d for %s\n",
283e6c9307d7f4 Shannon Nelson 2023-04-17  48  		__func__, ci, devname);
283e6c9307d7f4 Shannon Nelson 2023-04-17  49  
283e6c9307d7f4 Shannon Nelson 2023-04-17  50  	return ci;
283e6c9307d7f4 Shannon Nelson 2023-04-17  51  }
283e6c9307d7f4 Shannon Nelson 2023-04-17  52  EXPORT_SYMBOL_GPL(pds_client_register);
283e6c9307d7f4 Shannon Nelson 2023-04-17  53  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

  reply	other threads:[~2023-04-18  3:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18  0:32 [PATCH v10 net-next 00/14] pds_core driver Shannon Nelson
2023-04-18  0:32 ` [PATCH v10 net-next 01/14] pds_core: initial framework for pds_core PF driver Shannon Nelson
2023-04-18  0:32 ` [PATCH v10 net-next 02/14] pds_core: add devcmd device interfaces Shannon Nelson
2023-04-18  0:32 ` [PATCH v10 net-next 03/14] pds_core: health timer and workqueue Shannon Nelson
2023-04-18  0:32 ` [PATCH v10 net-next 04/14] pds_core: add devlink health facilities Shannon Nelson
2023-04-18  0:32 ` [PATCH v10 net-next 05/14] pds_core: set up device and adminq Shannon Nelson
2023-04-18  0:32 ` [PATCH v10 net-next 06/14] pds_core: Add adminq processing and commands Shannon Nelson
2023-04-18  0:32 ` [PATCH v10 net-next 07/14] pds_core: add FW update feature to devlink Shannon Nelson
2023-04-18  0:32 ` [PATCH v10 net-next 08/14] pds_core: set up the VIF definitions and defaults Shannon Nelson
2023-04-18  0:32 ` [PATCH v10 net-next 09/14] pds_core: add initial VF device handling Shannon Nelson
2023-04-18  0:32 ` [PATCH v10 net-next 10/14] pds_core: add auxiliary_bus devices Shannon Nelson
2023-04-18  0:32 ` [PATCH v10 net-next 11/14] pds_core: devlink params for enabling VIF support Shannon Nelson
2023-04-18  0:32 ` [PATCH v10 net-next 12/14] pds_core: add the aux client API Shannon Nelson
2023-04-18  0:32 ` [PATCH v10 net-next 13/14] pds_core: publish events to the clients Shannon Nelson
2023-04-18  0:32 ` [PATCH v10 net-next 14/14] pds_core: Kconfig and pds_core.rst Shannon Nelson
2023-04-18  3:56   ` kernel test robot [this message]
2023-04-18 16:30     ` Shannon Nelson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202304181137.WaZTYyAa-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=brett.creeley@amd.com \
    --cc=davem@davemloft.net \
    --cc=drivers@pensando.io \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=shannon.nelson@amd.com \
    --cc=simon.horman@corigine.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).