All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: arch/powerpc/xmon/xmon.c:3745:6: warning: Uninitialized variable: name [uninitvar]
Date: Sun, 30 Jan 2022 16:53:00 +0800	[thread overview]
Message-ID: <202201301307.UAnZQziX-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Arnd Bergmann <arnd@arndb.de>
CC: Michael Ellerman <mpe@ellerman.id.au>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f8c7e4ede46fe63ff10000669652648aab09d112
commit: a2305e3de819394a7adf68078964a92d06f9db33 powerpc: mark local variables around longjmp as volatile
date:   7 months ago
:::::: branch date: 13 hours ago
:::::: commit date: 7 months ago
compiler: powerpc64le-linux-gcc (GCC) 11.2.0

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


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> arch/powerpc/xmon/xmon.c:3745:6: warning: Uninitialized variable: name [uninitvar]
    if (name) {
        ^

vim +3745 arch/powerpc/xmon/xmon.c

^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3722  
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3723  
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3724  /* Print an address in numeric and symbolic form (if possible) */
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3725  static void xmon_print_symbol(unsigned long address, const char *mid,
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3726  			      const char *after)
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3727  {
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3728  	char *modname;
a2305e3de81939 arch/powerpc/xmon/xmon.c Arnd Bergmann  2021-04-29  3729  	const char *volatile name = NULL;
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3730  	unsigned long offset, size;
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3731  
f78541dcec327b arch/powerpc/xmon/xmon.c Paul Mackerras 2005-10-28  3732  	printf(REG, address);
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3733  	if (setjmp(bus_error_jmp) == 0) {
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3734  		catch_memory_errors = 1;
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3735  		sync();
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3736  		name = kallsyms_lookup(address, &size, &offset, &modname,
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3737  				       tmpstr);
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3738  		sync();
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3739  		/* wait a little while to see if we get a machine check */
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3740  		__delay(200);
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3741  	}
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3742  
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3743  	catch_memory_errors = 0;
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3744  
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16 @3745  	if (name) {
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3746  		printf("%s%s+%#lx/%#lx", mid, name, offset, size);
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3747  		if (modname)
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3748  			printf(" [%s]", modname);
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3749  	}
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3750  	printf("%s", after);
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3751  }
^1da177e4c3f41 arch/ppc64/xmon/xmon.c   Linus Torvalds 2005-04-16  3752  

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

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

             reply	other threads:[~2022-01-30  8:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-30  8:53 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-03-26 12:15 arch/powerpc/xmon/xmon.c:3745:6: warning: Uninitialized variable: name [uninitvar] kernel test robot
2022-03-10  0:04 kernel test robot
2022-01-19  6:27 kernel test robot
2022-01-18 11:14 kernel test robot

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=202201301307.UAnZQziX-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.