Re: [PATCH 3/3] watchdog: wm8350: Simplify using devm_watchdog_register_device()

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

 



Hi Uwe,

I love your patch! Yet something to improve:

[auto build test ERROR on fe15c26ee26efa11741a7b632e9f23b01aca4cc6]

url:    https://github.com/intel-lab-lkp/linux/commits/Uwe-Kleine-K-nig/watchdog-bcm47xx-Simplify-using-devm_watchdog_register_device/20230307-011628
base:   fe15c26ee26efa11741a7b632e9f23b01aca4cc6
patch link:    https://lore.kernel.org/r/20230306170901.2232323-4-u.kleine-koenig%40pengutronix.de
patch subject: [PATCH 3/3] watchdog: wm8350: Simplify using devm_watchdog_register_device()
config: ia64-allyesconfig (https://download.01.org/0day-ci/archive/20230307/202303070325.74bkgnG6-lkp@xxxxxxxxx/config)
compiler: ia64-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/94594fa75b3515d5dbff3ec2d1db1cf5627900b1
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Uwe-Kleine-K-nig/watchdog-bcm47xx-Simplify-using-devm_watchdog_register_device/20230307-011628
        git checkout 94594fa75b3515d5dbff3ec2d1db1cf5627900b1
        # 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=ia64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202303070325.74bkgnG6-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   drivers/watchdog/wm8350_wdt.c: In function 'wm8350_wdt_probe':
>> drivers/watchdog/wm8350_wdt.c:156:46: error: passing argument 1 of 'devm_watchdog_register_device' from incompatible pointer type [-Werror=incompatible-pointer-types]
     156 |         return devm_watchdog_register_device(&wm8350_wdt);
         |                                              ^~~~~~~~~~~
         |                                              |
         |                                              struct watchdog_device *
   In file included from drivers/watchdog/wm8350_wdt.c:15:
   include/linux/watchdog.h:226:50: note: expected 'struct device *' but argument is of type 'struct watchdog_device *'
     226 | int devm_watchdog_register_device(struct device *dev, struct watchdog_device *);
         |                                   ~~~~~~~~~~~~~~~^~~
>> drivers/watchdog/wm8350_wdt.c:156:16: error: too few arguments to function 'devm_watchdog_register_device'
     156 |         return devm_watchdog_register_device(&wm8350_wdt);
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/watchdog.h:226:5: note: declared here
     226 | int devm_watchdog_register_device(struct device *dev, struct watchdog_device *);
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/watchdog/wm8350_wdt.c:157:1: error: control reaches end of non-void function [-Werror=return-type]
     157 | }
         | ^
   cc1: some warnings being treated as errors


vim +/devm_watchdog_register_device +156 drivers/watchdog/wm8350_wdt.c

   139	
   140	static int wm8350_wdt_probe(struct platform_device *pdev)
   141	{
   142		struct wm8350 *wm8350 = platform_get_drvdata(pdev);
   143	
   144		if (!wm8350) {
   145			pr_err("No driver data supplied\n");
   146			return -ENODEV;
   147		}
   148	
   149		watchdog_set_nowayout(&wm8350_wdt, nowayout);
   150		watchdog_set_drvdata(&wm8350_wdt, wm8350);
   151		wm8350_wdt.parent = &pdev->dev;
   152	
   153		/* Default to 4s timeout */
   154		wm8350_wdt_set_timeout(&wm8350_wdt, 4);
   155	
 > 156		return devm_watchdog_register_device(&wm8350_wdt);
   157	}
   158	

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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux