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: <202212171056.JTCZdJZT-lkp@intel.com>
Date:   Sat, 17 Dec 2022 11:09:22 +0800
From:   kernel test robot <lkp@...el.com>
To:     Allen Webb <allenwebb@...gle.com>,
        "linux-modules@...r.kernel.org" <linux-modules@...r.kernel.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        Luis Chamberlain <mcgrof@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Allen Webb <allenwebb@...gle.com>
Subject: Re: [PATCH v7 4/5] file2alias.c: Implement builtin.alias generation

Hi Allen,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on masahiroy-kbuild/fixes]
[also build test WARNING on mcgrof/modules-next westeri-thunderbolt/next linus/master v6.1 next-20221216]
[cannot apply to masahiroy-kbuild/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Allen-Webb/module-h-MODULE_DEVICE_TABLE-for-built-in-modules/20221217-071949
base:   https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git fixes
patch link:    https://lore.kernel.org/r/20221216221703.294683-5-allenwebb%40google.com
patch subject: [PATCH v7 4/5] file2alias.c: Implement builtin.alias generation
config: x86_64-randconfig-a001
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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
        # https://github.com/intel-lab-lkp/linux/commit/e65dd221062ee2430d083c7a65400fe1b1fc771f
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Allen-Webb/module-h-MODULE_DEVICE_TABLE-for-built-in-modules/20221217-071949
        git checkout e65dd221062ee2430d083c7a65400fe1b1fc771f
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 prepare

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> scripts/mod/file2alias.c:679:9: warning: mixing declarations and code is incompatible with standards before C99 [-Wdeclaration-after-statement]
                           char acpi_id[PNP_ID_LEN];
                                ^
   1 warning generated.
--
>> scripts/mod/file2alias.c:679:9: warning: mixing declarations and code is incompatible with standards before C99 [-Wdeclaration-after-statement]
                           char acpi_id[PNP_ID_LEN];
                                ^
   1 warning generated.


vim +679 scripts/mod/file2alias.c

^1da177e4c3f41 Linus Torvalds 2005-04-16  633  
0c81eed4b9d627 Kay Sievers    2008-02-21  634  /* looks like: "pnp:dD" for every device of the card */
0c81eed4b9d627 Kay Sievers    2008-02-21  635  static void do_pnp_card_entries(void *symval, unsigned long size,
0c81eed4b9d627 Kay Sievers    2008-02-21  636  				struct module *mod)
^1da177e4c3f41 Linus Torvalds 2005-04-16  637  {
6543becf26fff6 Andreas Schwab 2013-01-20  638  	const unsigned long id_size = SIZE_pnp_card_device_id;
0c81eed4b9d627 Kay Sievers    2008-02-21  639  	const unsigned int count = (size / id_size)-1;
0c81eed4b9d627 Kay Sievers    2008-02-21  640  	unsigned int i;
0c81eed4b9d627 Kay Sievers    2008-02-21  641  
0c81eed4b9d627 Kay Sievers    2008-02-21  642  	device_id_check(mod->name, "pnp", size, id_size, symval);
0c81eed4b9d627 Kay Sievers    2008-02-21  643  
0c81eed4b9d627 Kay Sievers    2008-02-21  644  	for (i = 0; i < count; i++) {
0c81eed4b9d627 Kay Sievers    2008-02-21  645  		unsigned int j;
6543becf26fff6 Andreas Schwab 2013-01-20  646  		DEF_FIELD_ADDR(symval + i * id_size, pnp_card_device_id, devs);
0c81eed4b9d627 Kay Sievers    2008-02-21  647  
0c81eed4b9d627 Kay Sievers    2008-02-21  648  		for (j = 0; j < PNP_MAX_DEVICES; j++) {
6543becf26fff6 Andreas Schwab 2013-01-20  649  			const char *id = (char *)(*devs)[j].id;
0c81eed4b9d627 Kay Sievers    2008-02-21  650  			int i2, j2;
0c81eed4b9d627 Kay Sievers    2008-02-21  651  			int dup = 0;
0c81eed4b9d627 Kay Sievers    2008-02-21  652  
0c81eed4b9d627 Kay Sievers    2008-02-21  653  			if (!id[0])
0c81eed4b9d627 Kay Sievers    2008-02-21  654  				break;
0c81eed4b9d627 Kay Sievers    2008-02-21  655  
0c81eed4b9d627 Kay Sievers    2008-02-21  656  			/* find duplicate, already added value */
0c81eed4b9d627 Kay Sievers    2008-02-21  657  			for (i2 = 0; i2 < i && !dup; i2++) {
c2b1a9226fe7c1 Leonardo Bras  2018-10-24  658  				DEF_FIELD_ADDR_VAR(symval + i2 * id_size,
c2b1a9226fe7c1 Leonardo Bras  2018-10-24  659  						   pnp_card_device_id,
c2b1a9226fe7c1 Leonardo Bras  2018-10-24  660  						   devs, devs_dup);
0c81eed4b9d627 Kay Sievers    2008-02-21  661  
0c81eed4b9d627 Kay Sievers    2008-02-21  662  				for (j2 = 0; j2 < PNP_MAX_DEVICES; j2++) {
c2b1a9226fe7c1 Leonardo Bras  2018-10-24  663  					const char *id2 =
c2b1a9226fe7c1 Leonardo Bras  2018-10-24  664  						(char *)(*devs_dup)[j2].id;
^1da177e4c3f41 Linus Torvalds 2005-04-16  665  
0c81eed4b9d627 Kay Sievers    2008-02-21  666  					if (!id2[0])
0c81eed4b9d627 Kay Sievers    2008-02-21  667  						break;
0c81eed4b9d627 Kay Sievers    2008-02-21  668  
0c81eed4b9d627 Kay Sievers    2008-02-21  669  					if (!strcmp(id, id2)) {
0c81eed4b9d627 Kay Sievers    2008-02-21  670  						dup = 1;
^1da177e4c3f41 Linus Torvalds 2005-04-16  671  						break;
^1da177e4c3f41 Linus Torvalds 2005-04-16  672  					}
0c81eed4b9d627 Kay Sievers    2008-02-21  673  				}
0c81eed4b9d627 Kay Sievers    2008-02-21  674  			}
0c81eed4b9d627 Kay Sievers    2008-02-21  675  
0c81eed4b9d627 Kay Sievers    2008-02-21  676  			/* add an individual alias for every device entry */
e65dd221062ee2 Allen Webb     2022-12-16  677  			if (dup)
e65dd221062ee2 Allen Webb     2022-12-16  678  				continue;
6543becf26fff6 Andreas Schwab 2013-01-20 @679  			char acpi_id[PNP_ID_LEN];
72638f598ec9f0 Kay Sievers    2009-01-08  680  			int k;
72638f598ec9f0 Kay Sievers    2009-01-08  681  
0c81eed4b9d627 Kay Sievers    2008-02-21  682  			buf_printf(&mod->dev_table_buf,
0c81eed4b9d627 Kay Sievers    2008-02-21  683  				   "MODULE_ALIAS(\"pnp:d%s*\");\n", id);
e65dd221062ee2 Allen Webb     2022-12-16  684  			if (mod->builtin_name)
e65dd221062ee2 Allen Webb     2022-12-16  685  				buf_printf(&mod->modalias_buf, "alias pnp:d%s* %s\n",
e65dd221062ee2 Allen Webb     2022-12-16  686  					   id, mod->builtin_name);
72638f598ec9f0 Kay Sievers    2009-01-08  687  
72638f598ec9f0 Kay Sievers    2009-01-08  688  			/* fix broken pnp bus lowercasing */
72638f598ec9f0 Kay Sievers    2009-01-08  689  			for (k = 0; k < sizeof(acpi_id); k++)
72638f598ec9f0 Kay Sievers    2009-01-08  690  				acpi_id[k] = toupper(id[k]);
22454cb99fc39f Kay Sievers    2008-05-28  691  			buf_printf(&mod->dev_table_buf,
72638f598ec9f0 Kay Sievers    2009-01-08  692  				   "MODULE_ALIAS(\"acpi*:%s:*\");\n", acpi_id);
e65dd221062ee2 Allen Webb     2022-12-16  693  			if (mod->builtin_name)
e65dd221062ee2 Allen Webb     2022-12-16  694  				buf_printf(&mod->modalias_buf, "alias acpi*:%s:* %s\n",
e65dd221062ee2 Allen Webb     2022-12-16  695  					   acpi_id, mod->builtin_name);
0c81eed4b9d627 Kay Sievers    2008-02-21  696  		}
0c81eed4b9d627 Kay Sievers    2008-02-21  697  	}
^1da177e4c3f41 Linus Torvalds 2005-04-16  698  }
^1da177e4c3f41 Linus Torvalds 2005-04-16  699  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (151571 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ