public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: kbuild-all@01.org, linux-kbuild@vger.kernel.org
Subject: [kbuild:build-test2 2/2] arch/s390/include/asm/uaccess.h:141:9: warning: 'rc' may be used uninitialized in this function
Date: Mon, 1 Apr 2019 20:44:19 +0800	[thread overview]
Message-ID: <201904012017.Zdcl8wje%lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git build-test2
head:   dfc95c6ebbf550ee91f70b67c45396685bf4e055
commit: dfc95c6ebbf550ee91f70b67c45396685bf4e055 [2/2] compiler-attribute: stop forcing __always_inline to inline marker
config: s390-defconfig (attached as .config)
compiler: s390x-linux-gnu-gcc (Debian 7.2.0-11) 7.2.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 dfc95c6ebbf550ee91f70b67c45396685bf4e055
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=s390 

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

   In file included from include/linux/uaccess.h:11:0,
                    from include/linux/crypto.h:26,
                    from include/crypto/hash.h:16,
                    from include/linux/uio.h:14,
                    from include/linux/socket.h:8,
                    from include/linux/skbuff.h:23,
                    from include/linux/if_ether.h:23,
                    from arch/s390/include/asm/diag.h:12,
                    from arch/s390/include/asm/kvm_para.h:25,
                    from include/uapi/linux/kvm_para.h:35,
                    from include/linux/kvm_para.h:5,
                    from include/linux/kvm_host.h:34,
                    from arch/s390/kvm/kvm-s390.c:23:
   arch/s390/include/asm/uaccess.h: In function '__get_user_fn':
>> arch/s390/include/asm/uaccess.h:141:9: warning: 'rc' may be used uninitialized in this function [-Wmaybe-uninitialized]
     return rc;
            ^~
--
   arch/s390/mm/fault.c: In function 'dump_fault_info':
>> arch/s390/mm/fault.c:127:15: warning: 'asce' may be used uninitialized in this function [-Wmaybe-uninitialized]
     switch (asce & _ASCE_TYPE_MASK) {
   arch/s390/mm/fault.c:177:16: note: 'asce' was declared here
     unsigned long asce;
                   ^~~~

vim +/rc +141 arch/s390/include/asm/uaccess.h

dc4aace1 Heiko Carstens     2016-06-20  113  
dc4aace1 Heiko Carstens     2016-06-20  114  static inline int __get_user_fn(void *x, const void __user *ptr, unsigned long size)
dc4aace1 Heiko Carstens     2016-06-20  115  {
0aaba41b Martin Schwidefsky 2017-08-22  116  	unsigned long spec = 0x01UL;
dc4aace1 Heiko Carstens     2016-06-20  117  	int rc;
dc4aace1 Heiko Carstens     2016-06-20  118  
dc4aace1 Heiko Carstens     2016-06-20  119  	switch (size) {
dc4aace1 Heiko Carstens     2016-06-20  120  	case 1:
dc4aace1 Heiko Carstens     2016-06-20  121  		rc = __put_get_user_asm((unsigned char *)x,
dc4aace1 Heiko Carstens     2016-06-20  122  					(unsigned char __user *)ptr,
dc4aace1 Heiko Carstens     2016-06-20  123  					size, spec);
dc4aace1 Heiko Carstens     2016-06-20  124  		break;
dc4aace1 Heiko Carstens     2016-06-20  125  	case 2:
dc4aace1 Heiko Carstens     2016-06-20  126  		rc = __put_get_user_asm((unsigned short *)x,
dc4aace1 Heiko Carstens     2016-06-20  127  					(unsigned short __user *)ptr,
dc4aace1 Heiko Carstens     2016-06-20  128  					size, spec);
dc4aace1 Heiko Carstens     2016-06-20  129  		break;
dc4aace1 Heiko Carstens     2016-06-20  130  	case 4:
dc4aace1 Heiko Carstens     2016-06-20  131  		rc = __put_get_user_asm((unsigned int *)x,
dc4aace1 Heiko Carstens     2016-06-20  132  					(unsigned int __user *)ptr,
dc4aace1 Heiko Carstens     2016-06-20  133  					size, spec);
dc4aace1 Heiko Carstens     2016-06-20  134  		break;
dc4aace1 Heiko Carstens     2016-06-20  135  	case 8:
dc4aace1 Heiko Carstens     2016-06-20  136  		rc = __put_get_user_asm((unsigned long *)x,
dc4aace1 Heiko Carstens     2016-06-20  137  					(unsigned long __user *)ptr,
dc4aace1 Heiko Carstens     2016-06-20  138  					size, spec);
dc4aace1 Heiko Carstens     2016-06-20  139  		break;
0b925159 Heiko Carstens     2017-01-02  140  	}
dc4aace1 Heiko Carstens     2016-06-20 @141  	return rc;
dc4aace1 Heiko Carstens     2016-06-20  142  }
c9ca7841 Heiko Carstens     2014-04-17  143  

:::::: The code at line 141 was first introduced by commit
:::::: dc4aace160165bd15400a79f9f5ab97405278f48 s390/uaccess: fix __put_get_user_asm define

:::::: TO: Heiko Carstens <heiko.carstens@de.ibm.com>
:::::: CC: Martin Schwidefsky <schwidefsky@de.ibm.com>

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

                 reply	other threads:[~2019-04-01 12:44 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=201904012017.Zdcl8wje%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=yamada.masahiro@socionext.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