Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1562345

Re: [PATCH 4/4] alpha: Move two assignments for the variable "res" in srm_env_proc_write()

From kbuild test robot <lkp@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH 4/4] alpha: Move two assignments for the variable "res" in srm_env_proc_write()
Date 2017-01-19 01:50 +0100
Message-ID <t195n-2Ne-7@gated-at.bofh.it> (permalink)
References <t0X4d-3E5-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi Markus,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.10-rc4 next-20170118]
[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/SF-Markus-Elfring/alpha-Fine-tuning-for-five-function-implementations/20170119-075247
config: alpha-defconfig (attached as .config)
compiler: alpha-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=alpha 

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 >>):

   arch/alpha/kernel/srm_env.c: In function 'srm_env_proc_write':
>> arch/alpha/kernel/srm_env.c:108:6: warning: 'res' may be used uninitialized in this function [-Wmaybe-uninitialized]
     int res;
         ^~~

vim +/res +108 arch/alpha/kernel/srm_env.c

0ead0f84 Alexey Dobriyan   2009-12-14   92  		seq_write(m, page, ret);
0ead0f84 Alexey Dobriyan   2009-12-14   93  		ret = 0;
16b7f4dc Jan-Benedict Glaw 2006-11-07   94  	} else
0ead0f84 Alexey Dobriyan   2009-12-14   95  		ret = -EFAULT;
0ead0f84 Alexey Dobriyan   2009-12-14   96  	free_page((unsigned long)page);
0ead0f84 Alexey Dobriyan   2009-12-14   97  	return ret;
0ead0f84 Alexey Dobriyan   2009-12-14   98  }
^1da177e Linus Torvalds    2005-04-16   99  
0ead0f84 Alexey Dobriyan   2009-12-14  100  static int srm_env_proc_open(struct inode *inode, struct file *file)
0ead0f84 Alexey Dobriyan   2009-12-14  101  {
d9dda78b Al Viro           2013-03-31  102  	return single_open(file, srm_env_proc_show, PDE_DATA(inode));
^1da177e Linus Torvalds    2005-04-16  103  }
^1da177e Linus Torvalds    2005-04-16  104  
0ead0f84 Alexey Dobriyan   2009-12-14  105  static ssize_t srm_env_proc_write(struct file *file, const char __user *buffer,
0ead0f84 Alexey Dobriyan   2009-12-14  106  				  size_t count, loff_t *pos)
^1da177e Linus Torvalds    2005-04-16  107  {
^1da177e Linus Torvalds    2005-04-16 @108  	int res;
1c1ec6c6 Al Viro           2013-03-31  109  	unsigned long	id = (unsigned long)PDE_DATA(file_inode(file));
^1da177e Linus Torvalds    2005-04-16  110  	char		*buf = (char *) __get_free_page(GFP_USER);
^1da177e Linus Torvalds    2005-04-16  111  	unsigned long	ret1, ret2;
^1da177e Linus Torvalds    2005-04-16  112  
^1da177e Linus Torvalds    2005-04-16  113  	if (!buf)
^1da177e Linus Torvalds    2005-04-16  114  		return -ENOMEM;
^1da177e Linus Torvalds    2005-04-16  115  
cb234559 Markus Elfring    2017-01-18  116  	if (count >= PAGE_SIZE) {

:::::: The code at line 108 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] alpha: Fine-tuning for five function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-01-18 12:50 +0100
  [PATCH 4/4] alpha: Move two assignments for the variable "res" in  srm_env_proc_write() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-01-18 13:00 +0100
    Re: [PATCH 4/4] alpha: Move two assignments for the variable "res"  in srm_env_proc_write() Jan-Benedict Glaw <jbglaw@lug-owl.de> - 2017-01-18 14:40 +0100
      Re: [PATCH 4/4] alpha: Move two assignments for the variable "res" in  srm_env_proc_write() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-01-18 15:30 +0100
    Re: [PATCH 4/4] alpha: Move two assignments for the variable "res"  in srm_env_proc_write() Al Viro <viro@ZenIV.linux.org.uk> - 2017-01-18 15:20 +0100
      Re: alpha: Checking source code positions for the setting of error  codes SF Markus Elfring <elfring@users.sourceforge.net> - 2017-01-18 17:00 +0100
        Re: alpha: Checking source code positions for the setting of error  codes Al Viro <viro@ZenIV.linux.org.uk> - 2017-01-18 18:50 +0100
    Re: [PATCH 4/4] alpha: Move two assignments for the variable "res"  in srm_env_proc_write() kbuild test robot <lkp@intel.com> - 2017-01-19 01:50 +0100
  [PATCH 3/4] alpha: Return directly after a failed copy_from_user() or  getname() in two functions SF Markus Elfring <elfring@users.sourceforge.net> - 2017-01-18 13:00 +0100
  [PATCH 2/4] alpha: Move two assignments for the variable "error" in  osf_utsname() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-01-18 13:00 +0100

csiph-web