Re: [PATCHv2 2/4] wiegand: add Wiegand bus driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Martin,

I love your patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on linus/master v6.2-rc6 next-20230203]
[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-wiegand-add-Wiegand-controller-common-properties/20230202-223510
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link:    https://lore.kernel.org/r/20230202143305.21789-3-m.zatovic1%40gmail.com
patch subject: [PATCHv2 2/4] wiegand: add Wiegand bus driver
config: ia64-randconfig-s042-20230204 (https://download.01.org/0day-ci/archive/20230204/202302040653.thgxkOi8-lkp@xxxxxxxxx/config)
compiler: ia64-linux-gcc (GCC) 12.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://github.com/intel-lab-lkp/linux/commit/5dc4c223e5bb967973f6fbcbea5d45ee1f95db97
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Martin-Za-ovi/dt-bindings-wiegand-add-Wiegand-controller-common-properties/20230202-223510
        git checkout 5dc4c223e5bb967973f6fbcbea5d45ee1f95db97
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=ia64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/wiegand/

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

All errors (new ones prefixed by >>):

   drivers/wiegand/wiegand.c: In function 'of_register_wiegand_device':
>> drivers/wiegand/wiegand.c:106:14: error: implicit declaration of function 'of_modalias_node'; did you mean 'of_match_node'? [-Werror=implicit-function-declaration]
     106 |         rc = of_modalias_node(nc, wiegand->modalias, sizeof(wiegand->modalias));
         |              ^~~~~~~~~~~~~~~~
         |              of_match_node
   cc1: some warnings being treated as errors


vim +106 drivers/wiegand/wiegand.c

    91	
    92	static struct wiegand_device *of_register_wiegand_device(
    93							struct wiegand_controller *ctlr,
    94							struct device_node *nc)
    95	{
    96		struct wiegand_device *wiegand;
    97		int rc;
    98	
    99		wiegand = wiegand_alloc_device(ctlr);
   100		if (!wiegand) {
   101			dev_err(&ctlr->dev, "wiegad_device alloc error for %pOF\n", nc);
   102			rc = -ENOMEM;
   103			goto err_out;
   104		}
   105	
 > 106		rc = of_modalias_node(nc, wiegand->modalias, sizeof(wiegand->modalias));
   107		if (rc < 0) {
   108			dev_err(&ctlr->dev, "cannot find modalias for %pOF\n", nc);
   109			goto err_out;
   110		}
   111	
   112		of_node_get(nc);
   113		wiegand->dev.of_node = nc;
   114		wiegand->dev.fwnode = of_fwnode_handle(nc);
   115	
   116		rc = wiegand_add_device(wiegand);
   117		if (rc) {
   118			dev_err(&ctlr->dev, "wiegand_device register error %pOF\n", nc);
   119			goto err_of_node_put;
   120		}
   121	
   122		/* check if more devices are connected to the bus */
   123		if (ctlr->device_count > 1)
   124			dev_warn(&ctlr->dev, "Wiegand is a point-to-point bus, it is advised to only connect one device per Wiegand bus. The devices may not communicate using the same pulse length, format or else.\n");
   125	
   126		return wiegand;
   127	
   128	err_of_node_put:
   129		of_node_put(nc);
   130	err_out:
   131		wiegand_dev_put(wiegand);
   132		return ERR_PTR(rc);
   133	}
   134	

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



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux