All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 1/4] habanalabs: add "in device creation" status
Date: Sat, 21 Aug 2021 03:36:30 +0800	[thread overview]
Message-ID: <202108210331.VOLW2RYa-lkp@intel.com> (raw)
In-Reply-To: <20210820150719.67934-1-ogabbay@kernel.org>

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

Hi Oded,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on linux/master linus/master v5.14-rc6 next-20210820]
[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]

url:    https://github.com/0day-ci/linux/commits/Oded-Gabbay/habanalabs-add-in-device-creation-status/20210820-230930
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 1bd35e77ac2aadc1c22ca7335d4157eeae4a2fb8
config: sparc-randconfig-r014-20210816 (attached as .config)
compiler: sparc-linux-gcc (GCC) 11.2.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/0day-ci/linux/commit/c88e36085a6e21fde7e1ebcea36144a7d6df8d95
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Oded-Gabbay/habanalabs-add-in-device-creation-status/20210820-230930
        git checkout c88e36085a6e21fde7e1ebcea36144a7d6df8d95
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=sparc 

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

All warnings (new ones prefixed by >>):

   drivers/misc/habanalabs/common/sysfs.c: In function 'status_show':
>> drivers/misc/habanalabs/common/sysfs.c:290:9: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation]
     290 |         strncpy(str, hdev->status[hl_device_status(hdev)], HL_STR_MAX);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/strncpy +290 drivers/misc/habanalabs/common/sysfs.c

   283	
   284	static ssize_t status_show(struct device *dev, struct device_attribute *attr,
   285					char *buf)
   286	{
   287		struct hl_device *hdev = dev_get_drvdata(dev);
   288		char str[HL_STR_MAX];
   289	
 > 290		strncpy(str, hdev->status[hl_device_status(hdev)], HL_STR_MAX);
   291	
   292		/* use uppercase for backward compatibility */
   293		str[0] = 'A' + (str[0] - 'a');
   294	
   295		return sprintf(buf, "%s\n", str);
   296	}
   297	

---
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: 32998 bytes --]

      parent reply	other threads:[~2021-08-20 19:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-20 15:07 [PATCH 1/4] habanalabs: add "in device creation" status Oded Gabbay
2021-08-20 15:07 ` [PATCH 2/4] habanalabs: disable IRQ in user interrupts spinlock Oded Gabbay
2021-08-20 15:07 ` [PATCH 3/4] habanalabs: remove unnecessary device status check Oded Gabbay
2021-08-20 15:07 ` [PATCH 4/4] habanalabs: never copy_from_user inside spinlock Oded Gabbay
2021-08-21 11:04   ` Oded Gabbay
2021-08-20 19:36 ` kernel test robot [this message]

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=202108210331.VOLW2RYa-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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 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.