linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: kbuild-all@01.org,
	Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH] gspca: zero usb_buf on error
Date: Fri, 16 Aug 2019 13:16:14 +0800	[thread overview]
Message-ID: <201908161321.hY7Zk3bs%lkp@intel.com> (raw)
In-Reply-To: <d6898729-7c52-5948-5499-8dd03608c361@xs4all.nl>

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

Hi Hans,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linuxtv-media/master]
[cannot apply to v5.3-rc4 next-20190814]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Hans-Verkuil/gspca-zero-usb_buf-on-error/20190816-123155
base:   git://linuxtv.org/media_tree.git master
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=ia64 

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

All warnings (new ones prefixed by >>):

   drivers/media/usb/gspca/nw80x.c: In function 'reg_r':
>> drivers/media/usb/gspca/nw80x.c:1579:39: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
      memset(gspca_dev->usb_buf, 0, sizeof(gspca_dev->usb_buf));
                                          ^
--
   drivers/media/usb/gspca/sn9c20x.c: In function 'reg_r':
>> drivers/media/usb/gspca/sn9c20x.c:916:39: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
      memset(gspca_dev->usb_buf, 0, sizeof(gspca_dev->usb_buf));
                                          ^
--
   drivers/media/usb/gspca/sonixj.c: In function 'reg_r':
>> drivers/media/usb/gspca/sonixj.c:1169:39: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
      memset(gspca_dev->usb_buf, 0, sizeof(gspca_dev->usb_buf));
                                          ^
--
   drivers/media/usb/gspca/spca1528.c: In function 'reg_r':
>> drivers/media/usb/gspca/spca1528.c:78:39: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
      memset(gspca_dev->usb_buf, 0, sizeof(gspca_dev->usb_buf));
                                          ^
--
   drivers/media/usb/gspca/sq930x.c: In function 'reg_r':
>> drivers/media/usb/gspca/sq930x.c:432:39: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
      memset(gspca_dev->usb_buf, 0, sizeof(gspca_dev->usb_buf));
                                          ^
--
   drivers/media/usb/gspca/sunplus.c: In function 'reg_r':
>> drivers/media/usb/gspca/sunplus.c:262:39: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
      memset(gspca_dev->usb_buf, 0, sizeof(gspca_dev->usb_buf));
                                          ^
--
   drivers/media/usb/gspca/vc032x.c: In function 'reg_r_i':
>> drivers/media/usb/gspca/vc032x.c:2913:39: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
      memset(gspca_dev->usb_buf, 0, sizeof(gspca_dev->usb_buf));
                                          ^

vim +1579 drivers/media/usb/gspca/nw80x.c

  1556	
  1557	/* -- read registers in usb_buf -- */
  1558	static void reg_r(struct gspca_dev *gspca_dev,
  1559				u16 index,
  1560				int len)
  1561	{
  1562		struct usb_device *dev = gspca_dev->dev;
  1563		int ret;
  1564	
  1565		if (gspca_dev->usb_err < 0)
  1566			return;
  1567		ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
  1568				0x00,
  1569				USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
  1570				0x00, index,
  1571				gspca_dev->usb_buf, len, 500);
  1572		if (ret < 0) {
  1573			pr_err("reg_r err %d\n", ret);
  1574			gspca_dev->usb_err = ret;
  1575			/*
  1576			 * Make sure the buffer is zeroed to avoid uninitialized
  1577			 * values.
  1578			 */
> 1579			memset(gspca_dev->usb_buf, 0, sizeof(gspca_dev->usb_buf));
  1580			return;
  1581		}
  1582		if (len == 1)
  1583			gspca_dbg(gspca_dev, D_USBI, "GET 00 0000 %04x %02x\n",
  1584				  index, gspca_dev->usb_buf[0]);
  1585		else
  1586			gspca_dbg(gspca_dev, D_USBI, "GET 00 0000 %04x %02x %02x ..\n",
  1587				  index, gspca_dev->usb_buf[0],
  1588				  gspca_dev->usb_buf[1]);
  1589	}
  1590	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

  reply	other threads:[~2019-08-16  5:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15 12:47 [PATCH] gspca: zero usb_buf on error Hans Verkuil
2019-08-16  5:16 ` kbuild test robot [this message]
2019-08-16  5:48 ` kbuild test robot

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=201908161321.hY7Zk3bs%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kbuild-all@01.org \
    --cc=linux-media@vger.kernel.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 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).