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>] [day] [month] [year] [list]
Message-ID: <202312252216.1j7qX0Nl-lkp@intel.com>
Date: Mon, 25 Dec 2023 22:17:49 +0800
From: kernel test robot <lkp@...el.com>
To: Lubomir Rintel <lkundrak@...sk>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Sebastian Reichel <sebastian.reichel@...labora.com>
Subject: arch/x86/platform/olpc/olpc_dt.c:226:19: warning: variable 'len' set
 but not used

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   861deac3b092f37b2c5e6871732f3e11486f7082
commit: a7a9bacb9a32f9cebe5feda2e33064440f52d61d x86/platform/olpc: Use a correct version when making up a battery node
date:   4 years, 8 months ago
config: i386-buildonly-randconfig-001-20231102 (https://download.01.org/0day-ci/archive/20231225/202312252216.1j7qX0Nl-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231225/202312252216.1j7qX0Nl-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312252216.1j7qX0Nl-lkp@intel.com/

All warnings (new ones prefixed by >>):

   arch/x86/platform/olpc/olpc_dt.c:223:5: warning: no previous prototype for 'olpc_dt_compatible_match' [-Wmissing-prototypes]
     223 | int olpc_dt_compatible_match(phandle node, const char *compat)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/platform/olpc/olpc_dt.c: In function 'olpc_dt_compatible_match':
>> arch/x86/platform/olpc/olpc_dt.c:226:19: warning: variable 'len' set but not used [-Wunused-but-set-variable]
     226 |         int plen, len;
         |                   ^~~
   arch/x86/platform/olpc/olpc_dt.c: At top level:
   arch/x86/platform/olpc/olpc_dt.c:241:13: warning: no previous prototype for 'olpc_dt_fixup' [-Wmissing-prototypes]
     241 | void __init olpc_dt_fixup(void)
         |             ^~~~~~~~~~~~~


vim +/len +226 arch/x86/platform/olpc/olpc_dt.c

   222	
   223	int olpc_dt_compatible_match(phandle node, const char *compat)
   224	{
   225		char buf[64], *p;
 > 226		int plen, len;
   227	
   228		plen = olpc_dt_getproperty(node, "compatible", buf, sizeof(buf));
   229		if (plen <= 0)
   230			return 0;
   231	
   232		len = strlen(compat);
   233		for (p = buf; p < buf + plen; p += strlen(p) + 1) {
   234			if (strcmp(p, compat) == 0)
   235				return 1;
   236		}
   237	
   238		return 0;
   239	}
   240	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ