mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Tony Lindgren <tony@atomide.com>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	linux-kernel@vger.kernel.org
Subject: arch/arm/mach-omap2/sr_device.c:207:51: warning: variable 'sr_inst' is uninitialized when used here
Date: Sat, 27 Mar 2021 13:05:10 +0800	[thread overview]
Message-ID: <202103271303.BNY18cjh-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0f4498cef9f5cd18d7c6639a2a902ec1edc5be4e
commit: fbfa463be8dc7957ee4f81556e9e1ea2a951807d ARM: OMAP2+: Fix smartreflex init regression after dropping legacy data
date:   6 weeks ago
config: arm-randconfig-r025-20210326 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project f490a5969bd52c8a48586f134ff8f02ccbb295b3)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fbfa463be8dc7957ee4f81556e9e1ea2a951807d
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout fbfa463be8dc7957ee4f81556e9e1ea2a951807d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

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

All warnings (new ones prefixed by >>):

>> arch/arm/mach-omap2/sr_device.c:207:51: warning: variable 'sr_inst' is uninitialized when used here [-Wuninitialized]
                           name = kasprintf(GFP_KERNEL, "smartreflex_%s", sr_inst[i]);
                                                                          ^~~~~~~
   arch/arm/mach-omap2/sr_device.c:191:29: note: initialize the variable 'sr_inst' to silence this warning
           const char * const *sr_inst;
                                      ^
                                       = NULL
   1 warning generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for TEGRA20_APB_DMA
   Depends on DMADEVICES && (ARCH_TEGRA || COMPILE_TEST
   Selected by
   - SOC_TEGRA_FUSE && ARCH_TEGRA && ARCH_TEGRA_2x_SOC


vim +/sr_inst +207 arch/arm/mach-omap2/sr_device.c

   188	
   189	int __init omap_devinit_smartreflex(void)
   190	{
   191		const char * const *sr_inst;
   192		int i, nr_sr = 0;
   193	
   194		if (soc_is_omap44xx()) {
   195			sr_inst = omap4_sr_instances;
   196			nr_sr = ARRAY_SIZE(omap4_sr_instances);
   197	
   198		} else if (soc_is_dra7xx()) {
   199			sr_inst = dra7_sr_instances;
   200			nr_sr = ARRAY_SIZE(dra7_sr_instances);
   201		}
   202	
   203		if (nr_sr) {
   204			const char *name, *voltdm;
   205	
   206			for (i = 0; i < nr_sr; i++) {
 > 207				name = kasprintf(GFP_KERNEL, "smartreflex_%s", sr_inst[i]);

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

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

             reply	other threads:[~2021-03-27  5:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-27  5:05 kernel test robot [this message]
2021-03-31  6:38 ` Tony Lindgren

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=202103271303.BNY18cjh-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony@atomide.com \
    /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 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®