Re: [groeck-staging:watchdog-next 25/28] drivers/watchdog/da9063_wdt.c:177:15: error: implicit declaration of function 'i2c_smbus_write_byte_data'

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

 



Hi

On 29. 11. 21 13:24, kernel test robot wrote:
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git watchdog-next
head:   293903b9dfe43520f01374dc1661be11d6838c49
commit: 5ea29919c29413c984f4ba3e04a6679d306e7a6e [25/28] watchdog: da9063: use atomic safe i2c transfer in reset handler
config: csky-randconfig-r032-20211128 (https://download.01.org/0day-ci/archive/20211129/202111292050.cwhXdxtQ-lkp@xxxxxxxxx/config)
compiler: csky-linux-gcc (GCC) 11.2.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/groeck/linux-staging.git/commit/?id=5ea29919c29413c984f4ba3e04a6679d306e7a6e
         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 5ea29919c29413c984f4ba3e04a6679d306e7a6e
         # save the config file to linux build tree
         mkdir build_dir
         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=csky SHELL=/bin/bash drivers/

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

All errors (new ones prefixed by >>):

    drivers/watchdog/da9063_wdt.c: In function 'da9063_wdt_restart':
drivers/watchdog/da9063_wdt.c:177:15: error: implicit declaration of function 'i2c_smbus_write_byte_data' [-Werror=implicit-function-declaration]
      177 |         ret = i2c_smbus_write_byte_data(client, DA9063_REG_CONTROL_F,
          |               ^~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: some warnings being treated as errors


vim +/i2c_smbus_write_byte_data +177 drivers/watchdog/da9063_wdt.c

    168	
    169	static int da9063_wdt_restart(struct watchdog_device *wdd, unsigned long action,
    170				      void *data)
    171	{
    172		struct da9063 *da9063 = watchdog_get_drvdata(wdd);
    173		struct i2c_client *client = to_i2c_client(da9063->dev);
    174		int ret;
    175	
    176		/* Don't use regmap because it is not atomic safe */
  > 177		ret = i2c_smbus_write_byte_data(client, DA9063_REG_CONTROL_F,
    178						DA9063_SHUTDOWN);
    179		if (ret < 0)
    180			dev_alert(da9063->dev, "Failed to shutdown (err = %d)\n",
    181				  ret);
    182	
    183		/* wait for reset to assert... */
    184		mdelay(500);
    185	
    186		return ret;
    187	}
    188	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx


This should be fixed if we add hard dependency to I2C. Just like 44144c809e39 ("watchdog: da9062: Add dependency on I2C") fixes the 057b52b4b3d58 ("watchdog: da9062: make restart handler atomic safe") on the da9062.

I will create a patch and submit it if that's OK.

Sorry for not noticing this problem before submitting the initial patch.

BR,
Andrej



[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