[renesas-drivers:topic/phy-reset-v4 1/4] include/linux/err.h:31:9: warning: 'gpiod' 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/geert/renesas-drivers.git topic/phy-reset-v4
head:   8999caba1f624814c0e3e2a6fabfdab70ae44e9e
commit: 8274c902dc09564722a4ef7e1364bb3f3f2f9f79 [1/4] phylib: Add device reset GPIO support
config: i386-randconfig-x076-201749 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
        git checkout 8274c902dc09564722a4ef7e1364bb3f3f2f9f79
        # save the attached .config to linux build tree
        make ARCH=i386 

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 arch/x86/include/asm/processor.h:32:0,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:81,
                    from include/linux/spinlock.h:51,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/slab.h:15,
                    from drivers/net/phy/mdio_bus.c:20:
   drivers/net/phy/mdio_bus.c: In function 'mdiobus_register_device':
>> include/linux/err.h:31:9: warning: 'gpiod' may be used uninitialized in this function [-Wmaybe-uninitialized]
     return (long) ptr;
            ^~~~~~~~~~
   drivers/net/phy/mdio_bus.c:52:20: note: 'gpiod' was declared here
     struct gpio_desc *gpiod;
                       ^~~~~
--
   In file included from arch/x86/include/asm/processor.h:32:0,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:81,
                    from include/linux/spinlock.h:51,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/slab.h:15,
                    from drivers/net//phy/mdio_bus.c:20:
   drivers/net//phy/mdio_bus.c: In function 'mdiobus_register_device':
>> include/linux/err.h:31:9: warning: 'gpiod' may be used uninitialized in this function [-Wmaybe-uninitialized]
     return (long) ptr;
            ^~~~~~~~~~
   drivers/net//phy/mdio_bus.c:52:20: note: 'gpiod' was declared here
     struct gpio_desc *gpiod;
                       ^~~~~

vim +/gpiod +31 include/linux/err.h

^1da177e Linus Torvalds 2005-04-16  28  
e7152b97 Dan Carpenter  2013-07-03  29  static inline long __must_check PTR_ERR(__force const void *ptr)
^1da177e Linus Torvalds 2005-04-16  30  {
^1da177e Linus Torvalds 2005-04-16 @31  	return (long) ptr;
^1da177e Linus Torvalds 2005-04-16  32  }
^1da177e Linus Torvalds 2005-04-16  33  

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

:::::: TO: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>

---
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 Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux