[tip:WIP.sched/core 11/11] arch/m68k/include/asm/bitops.h:54:13: warning: 'tag' may be used uninitialized in this function
From: kbuild test robot
Date: Mon Mar 06 2017 - 04:27:46 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.sched/core
head: b7c6a9d358c54f2d57d3df384d42083817e05028
commit: b7c6a9d358c54f2d57d3df384d42083817e05028 [11/11] sched/wait: Introduce new, more compact wait_event*() primitives
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 4.9.0
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
git checkout b7c6a9d358c54f2d57d3df384d42083817e05028
# save the attached .config to linux build tree
make.cross ARCH=m68k
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/bitops.h:36:0,
from include/linux/kernel.h:10,
from include/linux/list.h:8,
from include/linux/async.h:16,
from drivers/scsi/ufs/ufshcd.c:40:
drivers/scsi/ufs/ufshcd.c: In function 'ufshcd_exec_dev_cmd':
>> arch/m68k/include/asm/bitops.h:54:13: warning: 'tag' may be used uninitialized in this function [-Wmaybe-uninitialized]
: "d" (nr ^ 31), "o" (*vaddr)
^
drivers/scsi/ufs/ufshcd.c:2589:6: note: 'tag' was declared here
int tag;
^
drivers/scsi/ufs/ufshcd.c: In function 'ufshcd_issue_tm_cmd':
drivers/scsi/ufs/ufshcd.c:5438:7: warning: 'free_slot' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (ufshcd_clear_tm_cmd(hba, free_slot))
^
vim +/tag +54 arch/m68k/include/asm/bitops.h
171d809d Greg Ungerer 2011-05-17 38 : "memory");
171d809d Greg Ungerer 2011-05-17 39 }
171d809d Greg Ungerer 2011-05-17 40
171d809d Greg Ungerer 2011-05-17 41 static inline void bset_mem_set_bit(int nr, volatile unsigned long *vaddr)
171d809d Greg Ungerer 2011-05-17 42 {
171d809d Greg Ungerer 2011-05-17 43 char *p = (char *)vaddr + (nr ^ 31) / 8;
171d809d Greg Ungerer 2011-05-17 44
171d809d Greg Ungerer 2011-05-17 45 __asm__ __volatile__ ("bset %1,%0"
171d809d Greg Ungerer 2011-05-17 46 : "+m" (*p)
171d809d Greg Ungerer 2011-05-17 47 : "di" (nr & 7));
171d809d Greg Ungerer 2011-05-17 48 }
171d809d Greg Ungerer 2011-05-17 49
171d809d Greg Ungerer 2011-05-17 50 static inline void bfset_mem_set_bit(int nr, volatile unsigned long *vaddr)
171d809d Greg Ungerer 2011-05-17 51 {
171d809d Greg Ungerer 2011-05-17 52 __asm__ __volatile__ ("bfset %1{%0:#1}"
171d809d Greg Ungerer 2011-05-17 53 :
171d809d Greg Ungerer 2011-05-17 @54 : "d" (nr ^ 31), "o" (*vaddr)
171d809d Greg Ungerer 2011-05-17 55 : "memory");
171d809d Greg Ungerer 2011-05-17 56 }
171d809d Greg Ungerer 2011-05-17 57
171d809d Greg Ungerer 2011-05-17 58 #if defined(CONFIG_COLDFIRE)
171d809d Greg Ungerer 2011-05-17 59 #define set_bit(nr, vaddr) bset_reg_set_bit(nr, vaddr)
171d809d Greg Ungerer 2011-05-17 60 #elif defined(CONFIG_CPU_HAS_NO_BITFIELDS)
171d809d Greg Ungerer 2011-05-17 61 #define set_bit(nr, vaddr) bset_mem_set_bit(nr, vaddr)
171d809d Greg Ungerer 2011-05-17 62 #else
:::::: The code at line 54 was first introduced by commit
:::::: 171d809df1896c1022f9778cd2788be6c255a7dc m68k: merge mmu and non-mmu bitops.h
:::::: TO: Greg Ungerer <gerg@xxxxxxxxxxx>
:::::: CC: Greg Ungerer <gerg@xxxxxxxxxxx>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip