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]
Date:   Thu, 5 Jan 2023 00:39:56 +0800
From:   kernel test robot <lkp@...el.com>
To:     Martin Zaťovič <m.zatovic1@...il.com>,
        linux-kernel@...r.kernel.org
Cc:     oe-kbuild-all@...ts.linux.dev, devicetree@...r.kernel.org,
        mani@...nel.org, hemantk@...eaurora.org, quic_jhugo@...cinc.com,
        andersson@...nel.org, Michael.Srba@...nam.cz, arnd@...db.de,
        dipenp@...dia.com, bvanassche@....org, iwona.winiarska@...el.com,
        ogabbay@...nel.org, tzimmermann@...e.de, fmdefrancesco@...il.com,
        jason.m.bills@...ux.intel.com, jae.hyun.yoo@...ux.intel.com,
        gregkh@...uxfoundation.org, krzysztof.kozlowski+dt@...aro.org,
        robh+dt@...nel.org,
        Martin Zaťovič <m.zatovic1@...il.com>
Subject: Re: [PATCH 3/3] wiegand: add Wiegand GPIO bit-banged controller
 driver

Hi Martin,

I love your patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on soc/for-next linus/master v6.2-rc2 next-20221226]
[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/Martin-Za-ovi/dt-bindings-add-Wiegand-controller-dt-binding-documentation/20230104-214445
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link:    https://lore.kernel.org/r/20230104133414.39305-4-m.zatovic1%40gmail.com
patch subject: [PATCH 3/3] wiegand: add Wiegand GPIO bit-banged controller driver
config: s390-allmodconfig
compiler: s390-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://github.com/intel-lab-lkp/linux/commit/ed03fc584a952013e31835962f4acd08762f50b7
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Martin-Za-ovi/dt-bindings-add-Wiegand-controller-dt-binding-documentation/20230104-214445
        git checkout ed03fc584a952013e31835962f4acd08762f50b7
        # 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=s390 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash drivers/bus/

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 >>):

   drivers/bus/wiegand.c: In function 'wiegand_match_id':
>> drivers/bus/wiegand.c:644:18: error: invalid use of undefined type 'const struct wiegand_device_id'
     644 |         while (id->name[0]) {
         |                  ^~
   drivers/bus/wiegand.c:645:37: error: invalid use of undefined type 'const struct wiegand_device_id'
     645 |                 if (!strcmp(name, id->name))
         |                                     ^~
>> drivers/bus/wiegand.c:647:19: error: increment of pointer to an incomplete type 'const struct wiegand_device_id'
     647 |                 id++;
         |                   ^~
   drivers/bus/wiegand.c: At top level:
>> drivers/bus/wiegand.c:692:27: error: initialization of 'void (*)(struct device *)' from incompatible pointer type 'int (*)(struct device *)' [-Werror=incompatible-pointer-types]
     692 |         .remove         = wiegand_remove,
         |                           ^~~~~~~~~~~~~~
   drivers/bus/wiegand.c:692:27: note: (near initialization for 'wiegand_bus_type.remove')
   cc1: some warnings being treated as errors


vim +644 drivers/bus/wiegand.c

d3072969f34bd2e Martin Zaťovič 2023-01-04  639  
d3072969f34bd2e Martin Zaťovič 2023-01-04  640  static const struct wiegand_device_id *wiegand_match_id(
d3072969f34bd2e Martin Zaťovič 2023-01-04  641  					const struct wiegand_device_id *id,
d3072969f34bd2e Martin Zaťovič 2023-01-04  642  					const char *name)
d3072969f34bd2e Martin Zaťovič 2023-01-04  643  {
d3072969f34bd2e Martin Zaťovič 2023-01-04 @644  	while (id->name[0]) {
d3072969f34bd2e Martin Zaťovič 2023-01-04  645  		if (!strcmp(name, id->name))
d3072969f34bd2e Martin Zaťovič 2023-01-04  646  			return id;
d3072969f34bd2e Martin Zaťovič 2023-01-04 @647  		id++;
d3072969f34bd2e Martin Zaťovič 2023-01-04  648  	}
d3072969f34bd2e Martin Zaťovič 2023-01-04  649  	return NULL;
d3072969f34bd2e Martin Zaťovič 2023-01-04  650  }
d3072969f34bd2e Martin Zaťovič 2023-01-04  651  
d3072969f34bd2e Martin Zaťovič 2023-01-04  652  static int wiegand_match_device(struct device *dev, struct device_driver *drv)
d3072969f34bd2e Martin Zaťovič 2023-01-04  653  {
d3072969f34bd2e Martin Zaťovič 2023-01-04  654  	const struct wiegand_device *wiegand = to_wiegand_device(dev);
d3072969f34bd2e Martin Zaťovič 2023-01-04  655  	const struct wiegand_driver *wdrv = to_wiegand_driver(drv);
d3072969f34bd2e Martin Zaťovič 2023-01-04  656  
d3072969f34bd2e Martin Zaťovič 2023-01-04  657  	if (of_driver_match_device(dev, drv))
d3072969f34bd2e Martin Zaťovič 2023-01-04  658  		return 1;
d3072969f34bd2e Martin Zaťovič 2023-01-04  659  
d3072969f34bd2e Martin Zaťovič 2023-01-04  660  	if (wdrv->id_table)
d3072969f34bd2e Martin Zaťovič 2023-01-04  661  		return !!wiegand_match_id(wdrv->id_table, wiegand->modalias);
d3072969f34bd2e Martin Zaťovič 2023-01-04  662  
d3072969f34bd2e Martin Zaťovič 2023-01-04  663  	return strcmp(wiegand->modalias, drv->name) == 0;
d3072969f34bd2e Martin Zaťovič 2023-01-04  664  }
d3072969f34bd2e Martin Zaťovič 2023-01-04  665  
d3072969f34bd2e Martin Zaťovič 2023-01-04  666  static int wiegand_probe(struct device *dev)
d3072969f34bd2e Martin Zaťovič 2023-01-04  667  {
d3072969f34bd2e Martin Zaťovič 2023-01-04  668  	struct wiegand_device *wiegand = to_wiegand_device(dev);
d3072969f34bd2e Martin Zaťovič 2023-01-04  669  	const struct wiegand_driver *wdrv = to_wiegand_driver(dev->driver);
d3072969f34bd2e Martin Zaťovič 2023-01-04  670  	int ret = 0;
d3072969f34bd2e Martin Zaťovič 2023-01-04  671  
d3072969f34bd2e Martin Zaťovič 2023-01-04  672  	if (wdrv->probe)
d3072969f34bd2e Martin Zaťovič 2023-01-04  673  		ret = wdrv->probe(wiegand);
d3072969f34bd2e Martin Zaťovič 2023-01-04  674  
d3072969f34bd2e Martin Zaťovič 2023-01-04  675  	return ret;
d3072969f34bd2e Martin Zaťovič 2023-01-04  676  }
d3072969f34bd2e Martin Zaťovič 2023-01-04  677  
d3072969f34bd2e Martin Zaťovič 2023-01-04  678  static int wiegand_remove(struct device *dev)
d3072969f34bd2e Martin Zaťovič 2023-01-04  679  {
d3072969f34bd2e Martin Zaťovič 2023-01-04  680  	const struct wiegand_driver *wdrv = to_wiegand_driver(dev->driver);
d3072969f34bd2e Martin Zaťovič 2023-01-04  681  
d3072969f34bd2e Martin Zaťovič 2023-01-04  682  	if (wdrv->remove)
d3072969f34bd2e Martin Zaťovič 2023-01-04  683  		wdrv->remove(to_wiegand_device(dev));
d3072969f34bd2e Martin Zaťovič 2023-01-04  684  
d3072969f34bd2e Martin Zaťovič 2023-01-04  685  	return 0;
d3072969f34bd2e Martin Zaťovič 2023-01-04  686  }
d3072969f34bd2e Martin Zaťovič 2023-01-04  687  
d3072969f34bd2e Martin Zaťovič 2023-01-04  688  static struct bus_type wiegand_bus_type = {
d3072969f34bd2e Martin Zaťovič 2023-01-04  689  	.name		= "wiegand",
d3072969f34bd2e Martin Zaťovič 2023-01-04  690  	.match		= wiegand_match_device,
d3072969f34bd2e Martin Zaťovič 2023-01-04  691  	.probe		= wiegand_probe,
d3072969f34bd2e Martin Zaťovič 2023-01-04 @692  	.remove		= wiegand_remove,
d3072969f34bd2e Martin Zaťovič 2023-01-04  693  };
d3072969f34bd2e Martin Zaťovič 2023-01-04  694  

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ