[groeck-staging:watchdog-next 36/38] drivers/watchdog/rn5t618_wdt.c:181:52: error: too few arguments to function call, expected 2, have 1

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git watchdog-next
head:   faaf9f98d1032c901d8e859e3b6883c7e67614b6
commit: 5c9e1ad78758b851a9dc3a1adb0df3f8782c7450 [36/38] watchdog: rn5t618: Simplify using devm_watchdog_register_device()
config: x86_64-randconfig-a014-20230306 (https://download.01.org/0day-ci/archive/20230307/202303070927.HjANQYhS-lkp@xxxxxxxxx/config)
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://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git/commit/?id=5c9e1ad78758b851a9dc3a1adb0df3f8782c7450
        git remote add groeck-staging https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git
        git fetch --no-tags groeck-staging watchdog-next
        git checkout 5c9e1ad78758b851a9dc3a1adb0df3f8782c7450
        # 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 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/202303070927.HjANQYhS-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/watchdog/rn5t618_wdt.c:181:52: error: too few arguments to function call, expected 2, have 1
           return devm_watchdog_register_device(&wdt->wdt_dev);
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~              ^
   include/linux/watchdog.h:226:5: note: 'devm_watchdog_register_device' declared here
   int devm_watchdog_register_device(struct device *dev, struct watchdog_device *);
       ^
   1 error generated.


vim +181 drivers/watchdog/rn5t618_wdt.c

   140	
   141	static int rn5t618_wdt_probe(struct platform_device *pdev)
   142	{
   143		struct device *dev = &pdev->dev;
   144		struct rn5t618 *rn5t618 = dev_get_drvdata(dev->parent);
   145		struct rn5t618_wdt *wdt;
   146		int min_timeout, max_timeout;
   147		int ret;
   148		unsigned int val;
   149	
   150		wdt = devm_kzalloc(dev, sizeof(struct rn5t618_wdt), GFP_KERNEL);
   151		if (!wdt)
   152			return -ENOMEM;
   153	
   154		min_timeout = rn5t618_wdt_map[0].time;
   155		max_timeout = rn5t618_wdt_map[ARRAY_SIZE(rn5t618_wdt_map) - 1].time;
   156	
   157		wdt->rn5t618 = rn5t618;
   158		wdt->wdt_dev.info = &rn5t618_wdt_info;
   159		wdt->wdt_dev.ops = &rn5t618_wdt_ops;
   160		wdt->wdt_dev.min_timeout = min_timeout;
   161		wdt->wdt_dev.max_timeout = max_timeout;
   162		wdt->wdt_dev.timeout = max_timeout;
   163		wdt->wdt_dev.parent = dev;
   164	
   165		/* Read out previous power-off factor */
   166		ret = regmap_read(wdt->rn5t618->regmap, RN5T618_POFFHIS, &val);
   167		if (ret)
   168			return ret;
   169	
   170		if (val & RN5T618_POFFHIS_VINDET)
   171			wdt->wdt_dev.bootstatus = WDIOF_POWERUNDER;
   172		else if (val & RN5T618_POFFHIS_WDG)
   173			wdt->wdt_dev.bootstatus = WDIOF_CARDRESET;
   174	
   175		watchdog_set_drvdata(&wdt->wdt_dev, wdt);
   176		watchdog_init_timeout(&wdt->wdt_dev, timeout, dev);
   177		watchdog_set_nowayout(&wdt->wdt_dev, nowayout);
   178	
   179		platform_set_drvdata(pdev, wdt);
   180	
 > 181		return devm_watchdog_register_device(&wdt->wdt_dev);
   182	}
   183	

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



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux