mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* arch/x86/include/asm/string_32.h:182:25: warning: 'val' may be used uninitialized in this function
@ 2020-01-01 19:51 kbuild test robot
  2020-01-02 23:52 ` Steven Rostedt
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2020-01-01 19:51 UTC (permalink / raw)
  To: Cong Wang; +Cc: kbuild-all, linux-kernel, Steven Rostedt (VMware)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   738d2902773e30939a982c8df7a7f94293659810
commit: 6c3edaf9fd6a3be7fb5bc6931897c24cd3848f84 tracing: Introduce trace event injection
date:   4 weeks ago
config: i386-randconfig-a003-20200102 (attached as .config)
compiler: gcc-6 (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
reproduce:
        git checkout 6c3edaf9fd6a3be7fb5bc6931897c24cd3848f84
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

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/string.h:3:0,
                    from include/linux/string.h:20,
                    from arch/x86/include/asm/page_32.h:35,
                    from arch/x86/include/asm/page.h:14,
                    from arch/x86/include/asm/thread_info.h:12,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:10,
                    from kernel/trace/trace_events_inject.c:8:
   kernel/trace/trace_events_inject.c: In function 'event_inject_write':
>> arch/x86/include/asm/string_32.h:182:25: warning: 'val' may be used uninitialized in this function [-Wmaybe-uninitialized]
    #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
                            ^~~~~~~~~~~~~~~~
   kernel/trace/trace_events_inject.c:200:6: note: 'val' was declared here
     u64 val;
         ^~~
--
   In file included from arch/x86/include/asm/string.h:3:0,
                    from include/linux/string.h:20,
                    from arch/x86/include/asm/page_32.h:35,
                    from arch/x86/include/asm/page.h:14,
                    from arch/x86/include/asm/thread_info.h:12,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:10,
                    from kernel//trace/trace_events_inject.c:8:
   kernel//trace/trace_events_inject.c: In function 'event_inject_write':
>> arch/x86/include/asm/string_32.h:182:25: warning: 'val' may be used uninitialized in this function [-Wmaybe-uninitialized]
    #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
                            ^~~~~~~~~~~~~~~~
   kernel//trace/trace_events_inject.c:200:6: note: 'val' was declared here
     u64 val;
         ^~~

vim +/val +182 arch/x86/include/asm/string_32.h

^1da177e4c3f41 include/asm-i386/string.h        Linus Torvalds   2005-04-16  177  
^1da177e4c3f41 include/asm-i386/string.h        Linus Torvalds   2005-04-16  178  /*
^1da177e4c3f41 include/asm-i386/string.h        Linus Torvalds   2005-04-16  179   *	No 3D Now!
^1da177e4c3f41 include/asm-i386/string.h        Linus Torvalds   2005-04-16  180   */
^1da177e4c3f41 include/asm-i386/string.h        Linus Torvalds   2005-04-16  181  
ff60fab71bb3b4 arch/x86/include/asm/string_32.h Arjan van de Ven 2009-09-28 @182  #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
^1da177e4c3f41 include/asm-i386/string.h        Linus Torvalds   2005-04-16  183  

:::::: The code at line 182 was first introduced by commit
:::::: ff60fab71bb3b4fdbf8caf57ff3739ffd0887396 x86: Use __builtin_memset and __builtin_memcpy for memset/memcpy

:::::: TO: Arjan van de Ven <arjan@infradead.org>
:::::: CC: H. Peter Anvin <hpa@zytor.com>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36661 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-02 23:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-01 19:51 arch/x86/include/asm/string_32.h:182:25: warning: 'val' may be used uninitialized in this function kbuild test robot
2020-01-02 23:52 ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®