mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Michal Simek <monstr@monstr.eu>
Subject: drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1848:2: warning: 'addr' may be used uninitialized in this function
Date: Mon, 11 Nov 2019 14:35:57 +0800	[thread overview]
Message-ID: <201911111450.bKV4DoTi%lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   31f4f5b495a62c9a8b15b1c3581acd5efeb9af8c
commit: 6a090e97972dc7bb6f2661eda3eabd8ae21e9b6d arch/microblaze: support get_user() of size 8 bytes
date:   8 weeks ago
config: microblaze-allyesconfig (attached as .config)
compiler: microblaze-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
        git checkout 6a090e97972dc7bb6f2661eda3eabd8ae21e9b6d
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=microblaze 

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

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers/staging/rtl8712/rtl871x_ioctl_linux.c: In function 'r8711_wx_write32':
>> drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1848:2: warning: 'addr' may be used uninitialized in this function [-Wmaybe-uninitialized]
     r8712_write32(padapter, addr, data32);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/rtl8712/rtl871x_ioctl_linux.c: In function 'r8711_wx_read32':
   drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1830:9: warning: 'addr' may be used uninitialized in this function [-Wmaybe-uninitialized]
     data32 = r8712_read32(padapter, addr);
     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/addr +1848 drivers/staging/rtl8712/rtl871x_ioctl_linux.c

2865d42c78a912 Larry Finger 2010-08-20  1837  
2865d42c78a912 Larry Finger 2010-08-20  1838  static int r8711_wx_write32(struct net_device *dev,
2865d42c78a912 Larry Finger 2010-08-20  1839  				 struct iw_request_info *info,
2865d42c78a912 Larry Finger 2010-08-20  1840  				 union iwreq_data *wrqu, char *keybuf)
2865d42c78a912 Larry Finger 2010-08-20  1841  {
8f47c28b5a0346 Julia Lawall 2015-03-29  1842  	struct _adapter *padapter = netdev_priv(dev);
2865d42c78a912 Larry Finger 2010-08-20  1843  	u32 addr;
2865d42c78a912 Larry Finger 2010-08-20  1844  	u32 data32;
2865d42c78a912 Larry Finger 2010-08-20  1845  
2865d42c78a912 Larry Finger 2010-08-20  1846  	get_user(addr, (u32 __user *)wrqu->data.pointer);
2865d42c78a912 Larry Finger 2010-08-20  1847  	data32 = ((u32)wrqu->data.length << 16) | (u32)wrqu->data.flags;
2865d42c78a912 Larry Finger 2010-08-20 @1848  	r8712_write32(padapter, addr, data32);
2865d42c78a912 Larry Finger 2010-08-20  1849  	return 0;
2865d42c78a912 Larry Finger 2010-08-20  1850  }
2865d42c78a912 Larry Finger 2010-08-20  1851  

:::::: The code at line 1848 was first introduced by commit
:::::: 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef staging: r8712u: Add the new driver to the mainline kernel

:::::: TO: Larry Finger <Larry.Finger@lwfinger.net>
:::::: CC: Larry Finger <Larry.Finger@lwfinger.net>

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

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

                 reply	other threads:[~2019-11-11  6:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=201911111450.bKV4DoTi%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=monstr@monstr.eu \
    --cc=rdunlap@infradead.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

all inboxes | Powered by JetHome®