[kbuild:kbuild2 3/5] arch/arm64/include/asm/io.h:84:21: warning: 'reg' may be used uninitialized in this function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild2
head:   5cd6239506cb97fb00c5992c1adaf6f9f788c5f2
commit: 13d2598cc964173bb063cffda9de778a89cdcfcd [3/5] kernel hacking: add a config option to disable compiler auto-inlining
config: arm64-allmodconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 8.2.0-11) 8.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 13d2598cc964173bb063cffda9de778a89cdcfcd
        # save the attached .config to linux build tree
        GCC_VERSION=8.2.0 make.cross ARCH=arm64 

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/scsi/ufs/ufs-qcom.c: In function 'ufs_qcom_testbus_config':
   drivers/scsi/ufs/ufs-qcom.c:1559:7: warning: 'offset' may be used uninitialized in this function [-Wmaybe-uninitialized]
     mask <<= offset;
     ~~~~~^~~~~~~~~~
   In file included from include/linux/io.h:25,
                    from drivers/scsi/ufs/ufshcd.h:44,
                    from drivers/scsi/ufs/ufs-qcom.c:20:
>> arch/arm64/include/asm/io.h:84:21: warning: 'reg' may be used uninitialized in this function [-Wmaybe-uninitialized]
    #define __raw_readl __raw_readl
                        ^~~~~~~~~~~
   drivers/scsi/ufs/ufs-qcom.c:1493:6: note: 'reg' was declared here
     int reg;
         ^~~
--
   drivers/scsi//ufs/ufs-qcom.c: In function 'ufs_qcom_testbus_config':
   drivers/scsi//ufs/ufs-qcom.c:1559:7: warning: 'offset' may be used uninitialized in this function [-Wmaybe-uninitialized]
     mask <<= offset;
     ~~~~~^~~~~~~~~~
   In file included from include/linux/io.h:25,
                    from drivers/scsi//ufs/ufshcd.h:44,
                    from drivers/scsi//ufs/ufs-qcom.c:20:
>> arch/arm64/include/asm/io.h:84:21: warning: 'reg' may be used uninitialized in this function [-Wmaybe-uninitialized]
    #define __raw_readl __raw_readl
                        ^~~~~~~~~~~
   drivers/scsi//ufs/ufs-qcom.c:1493:6: note: 'reg' was declared here
     int reg;
         ^~~

vim +/reg +84 arch/arm64/include/asm/io.h

fc47897d Catalin Marinas 2012-03-05  83  
09a57239 Thierry Reding  2014-07-28 @84  #define __raw_readl __raw_readl
fc47897d Catalin Marinas 2012-03-05  85  static inline u32 __raw_readl(const volatile void __iomem *addr)
fc47897d Catalin Marinas 2012-03-05  86  {
fc47897d Catalin Marinas 2012-03-05  87  	u32 val;
5afaa1fc Andre Przywara  2014-11-14  88  	asm volatile(ALTERNATIVE("ldr %w0, [%1]",
5afaa1fc Andre Przywara  2014-11-14  89  				 "ldar %w0, [%1]",
5afaa1fc Andre Przywara  2014-11-14  90  				 ARM64_WORKAROUND_DEVICE_LOAD_ACQUIRE)
5afaa1fc Andre Przywara  2014-11-14  91  		     : "=r" (val) : "r" (addr));
fc47897d Catalin Marinas 2012-03-05  92  	return val;
fc47897d Catalin Marinas 2012-03-05  93  }
fc47897d Catalin Marinas 2012-03-05  94  

:::::: The code at line 84 was first introduced by commit
:::::: 09a5723983e383e7d627fe3191366761722695bc arm64: Use include/asm-generic/io.h

:::::: TO: Thierry Reding <treding@xxxxxxxxxx>
:::::: CC: Thierry Reding <treding@xxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux