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]
Date:   Sat, 26 Nov 2022 03:37:57 +0800
From:   kernel test robot <lkp@...el.com>
To:     Xu Panda <xu.panda@....com.cn>
Cc:     oe-kbuild-all@...ts.linux.dev, netdev@...r.kernel.org,
        Yang Yang <yang.yang29@....com>
Subject: [net-next:master 2/26]
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:7583:28: error: too many
 arguments to function 'sysfs_streq'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head:   a6e3d86ece0b42a571a11055ace5c3148cb7ce76
commit: f72cd76b05ea1ce9258484e8127932d0ea928f22 [2/26] net: stmmac: use sysfs_streq() instead of strncmp()
config: microblaze-randconfig-r016-20221124
compiler: microblaze-linux-gcc (GCC) 12.1.0
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://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=f72cd76b05ea1ce9258484e8127932d0ea928f22
        git remote add net-next https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
        git fetch --no-tags net-next master
        git checkout f72cd76b05ea1ce9258484e8127932d0ea928f22
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=microblaze SHELL=/bin/bash drivers/net/ethernet/stmicro/stmmac/

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

All errors (new ones prefixed by >>):

   In file included from include/linux/err.h:5,
                    from include/linux/clk.h:12,
                    from drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:17:
   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function 'stmmac_cmdline_opt':
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:7583:28: error: too many arguments to function 'sysfs_streq'
    7583 |                 } else if (sysfs_streq(opt, "pause:", 6)) {
         |                            ^~~~~~~~~~~
   include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
      58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
         |                                                    ^~~~
   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:7583:24: note: in expansion of macro 'if'
    7583 |                 } else if (sysfs_streq(opt, "pause:", 6)) {
         |                        ^~
   In file included from include/linux/bitmap.h:11,
                    from include/linux/cpumask.h:12,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/mutex.h:17,
                    from include/linux/notifier.h:14,
                    from include/linux/clk.h:14:
   include/linux/string.h:185:13: note: declared here
     185 | extern bool sysfs_streq(const char *s1, const char *s2);
         |             ^~~~~~~~~~~
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:7583:28: error: too many arguments to function 'sysfs_streq'
    7583 |                 } else if (sysfs_streq(opt, "pause:", 6)) {
         |                            ^~~~~~~~~~~
   include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
      58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
         |                                                             ^~~~
   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:7583:24: note: in expansion of macro 'if'
    7583 |                 } else if (sysfs_streq(opt, "pause:", 6)) {
         |                        ^~
   include/linux/string.h:185:13: note: declared here
     185 | extern bool sysfs_streq(const char *s1, const char *s2);
         |             ^~~~~~~~~~~
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:7583:28: error: too many arguments to function 'sysfs_streq'
    7583 |                 } else if (sysfs_streq(opt, "pause:", 6)) {
         |                            ^~~~~~~~~~~
   include/linux/compiler.h:69:10: note: in definition of macro '__trace_if_value'
      69 |         (cond) ?                                        \
         |          ^~~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
      56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
         |                            ^~~~~~~~~~~~~~
   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:7583:24: note: in expansion of macro 'if'
    7583 |                 } else if (sysfs_streq(opt, "pause:", 6)) {
         |                        ^~
   include/linux/string.h:185:13: note: declared here
     185 | extern bool sysfs_streq(const char *s1, const char *s2);
         |             ^~~~~~~~~~~


vim +/sysfs_streq +7583 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

  7556	
  7557	#ifndef MODULE
  7558	static int __init stmmac_cmdline_opt(char *str)
  7559	{
  7560		char *opt;
  7561	
  7562		if (!str || !*str)
  7563			return 1;
  7564		while ((opt = strsep(&str, ",")) != NULL) {
  7565			if (sysfs_streq(opt, "debug:")) {
  7566				if (kstrtoint(opt + 6, 0, &debug))
  7567					goto err;
  7568			} else if (sysfs_streq(opt, "phyaddr:")) {
  7569				if (kstrtoint(opt + 8, 0, &phyaddr))
  7570					goto err;
  7571			} else if (sysfs_streq(opt, "buf_sz:")) {
  7572				if (kstrtoint(opt + 7, 0, &buf_sz))
  7573					goto err;
  7574			} else if (sysfs_streq(opt, "tc:")) {
  7575				if (kstrtoint(opt + 3, 0, &tc))
  7576					goto err;
  7577			} else if (sysfs_streq(opt, "watchdog:")) {
  7578				if (kstrtoint(opt + 9, 0, &watchdog))
  7579					goto err;
  7580			} else if (sysfs_streq(opt, "flow_ctrl:")) {
  7581				if (kstrtoint(opt + 10, 0, &flow_ctrl))
  7582					goto err;
> 7583			} else if (sysfs_streq(opt, "pause:", 6)) {
  7584				if (kstrtoint(opt + 6, 0, &pause))
  7585					goto err;
  7586			} else if (sysfs_streq(opt, "eee_timer:")) {
  7587				if (kstrtoint(opt + 10, 0, &eee_timer))
  7588					goto err;
  7589			} else if (sysfs_streq(opt, "chain_mode:")) {
  7590				if (kstrtoint(opt + 11, 0, &chain_mode))
  7591					goto err;
  7592			}
  7593		}
  7594		return 1;
  7595	
  7596	err:
  7597		pr_err("%s: ERROR broken module parameter conversion", __func__);
  7598		return 1;
  7599	}
  7600	

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ