lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202002271429.06uBXXSr%lkp@intel.com>
Date:   Thu, 27 Feb 2020 14:28:32 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Gayatri Kammela <gayatri.kammela@...el.com>
Cc:     kbuild-all@...ts.01.org, platform-driver-x86@...r.kernel.org,
        linux-kernel@...r.kernel.org, vishwanath.somayaji@...el.com,
        dvhart@...radead.org, mika.westerberg@...el.com,
        peterz@...radead.org, charles.d.prestopine@...el.com,
        Gayatri Kammela <gayatri.kammela@...el.com>,
        Chen Zhou <chenzhou10@...wei.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        "David E . Box" <david.e.box@...el.com>
Subject: Re: [PATCH v1 1/4] platform/x86: intel_pmc_core: fix: Make
 pmc_core_lpm_display() generic for platforms that support sub-states

Hi Gayatri,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on platform-drivers-x86/for-next]
[also build test WARNING on next-20200226]
[cannot apply to tip/auto-latest linux/master linus/master v5.6-rc3]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Gayatri-Kammela/platform-x86-intel_pmc_core-Add-bug-fixes-or-code/20200227-105701
base:   git://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git for-next
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
reproduce:
        # 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@...el.com>

All warnings (new ones prefixed by >>):

   drivers/platform/x86/intel_pmc_core.c: In function 'pmc_core_lpm_display':
>> drivers/platform/x86/intel_pmc_core.c:987:2: warning: ISO C90 forbids variable length array 'lpm_regs' [-Wvla]
     u32 lpm_regs[arr_size];
     ^~~
>> drivers/platform/x86/intel_pmc_core.c:987:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]

vim +/lpm_regs +987 drivers/platform/x86/intel_pmc_core.c

   976	
   977	static void pmc_core_lpm_display(struct pmc_dev *pmcdev, struct device *dev,
   978					 struct seq_file *s, u32 offset,
   979					 const char *str,
   980					 const struct pmc_bit_map **maps)
   981	{
   982		int index, idx, len = 32, bit_mask, arr_size = 0;
   983	
   984		for (index = 0; maps[index]; index++)
   985			arr_size++;
   986	
 > 987		u32 lpm_regs[arr_size];
   988	
   989		for (index = 0; maps[index]; index++) {
   990			lpm_regs[index] = pmc_core_reg_read(pmcdev, offset);
   991			offset += 4;
   992		}
   993	
   994		for (idx = 0; maps[idx]; idx++) {
   995			if (dev)
   996				dev_dbg(dev, "\nLPM_%s_%d:\t0x%x\n", str, idx,
   997					lpm_regs[idx]);
   998			if (s)
   999				seq_printf(s, "\nLPM_%s_%d:\t0x%x\n", str, idx,
  1000					   lpm_regs[idx]);
  1001			for (index = 0; maps[idx][index].name && index < len; index++) {
  1002				bit_mask = maps[idx][index].bit_mask;
  1003				if (dev)
  1004					dev_dbg(dev, "%-30s %-30d\n",
  1005						maps[idx][index].name,
  1006						lpm_regs[idx] & bit_mask ? 1 : 0);
  1007				if (s)
  1008					seq_printf(s, "%-30s %-30d\n",
  1009						   maps[idx][index].name,
  1010						   lpm_regs[idx] & bit_mask ? 1 : 0);
  1011			}
  1012		}
  1013	}
  1014	

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

Download attachment ".config.gz" of type "application/gzip" (71483 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ