All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 11029/12352] drivers/watchdog/da9062_wdt.c:155:8: error: implicit declaration of function 'i2c_smbus_write_byte_data'; did you mean 'i2c_set_clientdata'?
@ 2020-02-05 22:08 kbuild test robot
  2020-02-06  9:09 ` Marco Felsch
  0 siblings, 1 reply; 4+ messages in thread
From: kbuild test robot @ 2020-02-05 22:08 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1999 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   14b549456391a8b8f812529896b2690c16349734
commit: 057b52b4b3d58f4ee5944171da50f77b00a1bb0d [11029/12352] watchdog: da9062: make restart handler atomic safe
config: x86_64-randconfig-d002-20200206 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
        git checkout 057b52b4b3d58f4ee5944171da50f77b00a1bb0d
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/watchdog/da9062_wdt.c: In function 'da9062_wdt_restart':
>> drivers/watchdog/da9062_wdt.c:155:8: error: implicit declaration of function 'i2c_smbus_write_byte_data'; did you mean 'i2c_set_clientdata'? [-Werror=implicit-function-declaration]
     ret = i2c_smbus_write_byte_data(client, DA9062AA_CONTROL_F,
           ^~~~~~~~~~~~~~~~~~~~~~~~~
           i2c_set_clientdata
   cc1: some warnings being treated as errors

vim +155 drivers/watchdog/da9062_wdt.c

   146	
   147	static int da9062_wdt_restart(struct watchdog_device *wdd, unsigned long action,
   148				      void *data)
   149	{
   150		struct da9062_watchdog *wdt = watchdog_get_drvdata(wdd);
   151		struct i2c_client *client = to_i2c_client(wdt->hw->dev);
   152		int ret;
   153	
   154		/* Don't use regmap because it is not atomic safe */
 > 155		ret = i2c_smbus_write_byte_data(client, DA9062AA_CONTROL_F,
   156						DA9062AA_SHUTDOWN_MASK);
   157		if (ret < 0)
   158			dev_alert(wdt->hw->dev, "Failed to shutdown (err = %d)\n",
   159				  ret);
   160	
   161		/* wait for reset to assert... */
   162		mdelay(500);
   163	
   164		return ret;
   165	}
   166	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34212 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-next:master 11029/12352] drivers/watchdog/da9062_wdt.c:155:8: error: implicit declaration of function 'i2c_smbus_write_byte_data'; did you mean 'i2c_set_clientdata'?
  2020-02-05 22:08 [linux-next:master 11029/12352] drivers/watchdog/da9062_wdt.c:155:8: error: implicit declaration of function 'i2c_smbus_write_byte_data'; did you mean 'i2c_set_clientdata'? kbuild test robot
@ 2020-02-06  9:09 ` Marco Felsch
  2020-02-06 13:12   ` Chen, Rong A
  2020-02-06 14:39   ` Guenter Roeck
  0 siblings, 2 replies; 4+ messages in thread
From: Marco Felsch @ 2020-02-06  9:09 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2542 bytes --]

Hi,

On 20-02-06 06:08, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   14b549456391a8b8f812529896b2690c16349734
> commit: 057b52b4b3d58f4ee5944171da50f77b00a1bb0d [11029/12352] watchdog: da9062: make restart handler atomic safe
> config: x86_64-randconfig-d002-20200206 (attached as .config)
> compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
> reproduce:
>         git checkout 057b52b4b3d58f4ee5944171da50f77b00a1bb0d
>         # save the attached .config to linux build tree
>         make ARCH=x86_64 
> 
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    drivers/watchdog/da9062_wdt.c: In function 'da9062_wdt_restart':
> >> drivers/watchdog/da9062_wdt.c:155:8: error: implicit declaration of function 'i2c_smbus_write_byte_data'; did you mean 'i2c_set_clientdata'? [-Werror=implicit-function-declaration]
>      ret = i2c_smbus_write_byte_data(client, DA9062AA_CONTROL_F,
>            ^~~~~~~~~~~~~~~~~~~~~~~~~
>            i2c_set_clientdata
>    cc1: some warnings being treated as errors

this is a false positive due to the COMPILE_TEST ability.

Regards,
  Marco

> vim +155 drivers/watchdog/da9062_wdt.c
> 
>    146	
>    147	static int da9062_wdt_restart(struct watchdog_device *wdd, unsigned long action,
>    148				      void *data)
>    149	{
>    150		struct da9062_watchdog *wdt = watchdog_get_drvdata(wdd);
>    151		struct i2c_client *client = to_i2c_client(wdt->hw->dev);
>    152		int ret;
>    153	
>    154		/* Don't use regmap because it is not atomic safe */
>  > 155		ret = i2c_smbus_write_byte_data(client, DA9062AA_CONTROL_F,
>    156						DA9062AA_SHUTDOWN_MASK);
>    157		if (ret < 0)
>    158			dev_alert(wdt->hw->dev, "Failed to shutdown (err = %d)\n",
>    159				  ret);
>    160	
>    161		/* wait for reset to assert... */
>    162		mdelay(500);
>    163	
>    164		return ret;
>    165	}
>    166	
> 
> ---
> 0-DAY kernel test infrastructure                 Open Source Technology Center
> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation



-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-next:master 11029/12352] drivers/watchdog/da9062_wdt.c:155:8: error: implicit declaration of function 'i2c_smbus_write_byte_data'; did you mean 'i2c_set_clientdata'?
  2020-02-06  9:09 ` Marco Felsch
@ 2020-02-06 13:12   ` Chen, Rong A
  2020-02-06 14:39   ` Guenter Roeck
  1 sibling, 0 replies; 4+ messages in thread
From: Chen, Rong A @ 2020-02-06 13:12 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2458 bytes --]



On 2/6/2020 5:09 PM, Marco Felsch wrote:
> Hi,
>
> On 20-02-06 06:08, kbuild test robot wrote:
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>> head:   14b549456391a8b8f812529896b2690c16349734
>> commit: 057b52b4b3d58f4ee5944171da50f77b00a1bb0d [11029/12352] watchdog: da9062: make restart handler atomic safe
>> config: x86_64-randconfig-d002-20200206 (attached as .config)
>> compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
>> reproduce:
>>          git checkout 057b52b4b3d58f4ee5944171da50f77b00a1bb0d
>>          # save the attached .config to linux build tree
>>          make ARCH=x86_64
>>
>> If you fix the issue, kindly add following tag
>> Reported-by: kbuild test robot <lkp@intel.com>
>>
>> All errors (new ones prefixed by >>):
>>
>>     drivers/watchdog/da9062_wdt.c: In function 'da9062_wdt_restart':
>>>> drivers/watchdog/da9062_wdt.c:155:8: error: implicit declaration of function 'i2c_smbus_write_byte_data'; did you mean 'i2c_set_clientdata'? [-Werror=implicit-function-declaration]
>>       ret = i2c_smbus_write_byte_data(client, DA9062AA_CONTROL_F,
>>             ^~~~~~~~~~~~~~~~~~~~~~~~~
>>             i2c_set_clientdata
>>     cc1: some warnings being treated as errors
> this is a false positive due to the COMPILE_TEST ability.
>
> Regards,
>    Marco

Hi Marco,

Thanks for the clarification, we'll take a look.

Best Regards,
Rong Chen

>
>> vim +155 drivers/watchdog/da9062_wdt.c
>>
>>     146	
>>     147	static int da9062_wdt_restart(struct watchdog_device *wdd, unsigned long action,
>>     148				      void *data)
>>     149	{
>>     150		struct da9062_watchdog *wdt = watchdog_get_drvdata(wdd);
>>     151		struct i2c_client *client = to_i2c_client(wdt->hw->dev);
>>     152		int ret;
>>     153	
>>     154		/* Don't use regmap because it is not atomic safe */
>>   > 155		ret = i2c_smbus_write_byte_data(client, DA9062AA_CONTROL_F,
>>     156						DA9062AA_SHUTDOWN_MASK);
>>     157		if (ret < 0)
>>     158			dev_alert(wdt->hw->dev, "Failed to shutdown (err = %d)\n",
>>     159				  ret);
>>     160	
>>     161		/* wait for reset to assert... */
>>     162		mdelay(500);
>>     163	
>>     164		return ret;
>>     165	}
>>     166	
>>
>> ---
>> 0-DAY kernel test infrastructure                 Open Source Technology Center
>> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-next:master 11029/12352] drivers/watchdog/da9062_wdt.c:155:8: error: implicit declaration of function 'i2c_smbus_write_byte_data'; did you mean 'i2c_set_clientdata'?
  2020-02-06  9:09 ` Marco Felsch
  2020-02-06 13:12   ` Chen, Rong A
@ 2020-02-06 14:39   ` Guenter Roeck
  1 sibling, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2020-02-06 14:39 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2782 bytes --]

On 2/6/20 1:09 AM, Marco Felsch wrote:
> Hi,
> 
> On 20-02-06 06:08, kbuild test robot wrote:
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>> head:   14b549456391a8b8f812529896b2690c16349734
>> commit: 057b52b4b3d58f4ee5944171da50f77b00a1bb0d [11029/12352] watchdog: da9062: make restart handler atomic safe
>> config: x86_64-randconfig-d002-20200206 (attached as .config)
>> compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
>> reproduce:
>>          git checkout 057b52b4b3d58f4ee5944171da50f77b00a1bb0d
>>          # save the attached .config to linux build tree
>>          make ARCH=x86_64
>>
>> If you fix the issue, kindly add following tag
>> Reported-by: kbuild test robot <lkp@intel.com>
>>
>> All errors (new ones prefixed by >>):
>>
>>     drivers/watchdog/da9062_wdt.c: In function 'da9062_wdt_restart':
>>>> drivers/watchdog/da9062_wdt.c:155:8: error: implicit declaration of function 'i2c_smbus_write_byte_data'; did you mean 'i2c_set_clientdata'? [-Werror=implicit-function-declaration]
>>       ret = i2c_smbus_write_byte_data(client, DA9062AA_CONTROL_F,
>>             ^~~~~~~~~~~~~~~~~~~~~~~~~
>>             i2c_set_clientdata
>>     cc1: some warnings being treated as errors
> 
> this is a false positive due to the COMPILE_TEST ability.
> 

It depends - COMPILE_TEST means that the file can be compiled even without
MFD_DA9062 enabled, so the hard dependency on I2C should be specified
explicitly (to avoid building the file on an architecture which does not
support I2C). But it does appear that this configuration explicitly enables
COMPILE_TEST and disables I2C, which isn't exactly what COMPILE_TEST is
supposed to be used for.

Guenter

> Regards,
>    Marco
> 
>> vim +155 drivers/watchdog/da9062_wdt.c
>>
>>     146	
>>     147	static int da9062_wdt_restart(struct watchdog_device *wdd, unsigned long action,
>>     148				      void *data)
>>     149	{
>>     150		struct da9062_watchdog *wdt = watchdog_get_drvdata(wdd);
>>     151		struct i2c_client *client = to_i2c_client(wdt->hw->dev);
>>     152		int ret;
>>     153	
>>     154		/* Don't use regmap because it is not atomic safe */
>>   > 155		ret = i2c_smbus_write_byte_data(client, DA9062AA_CONTROL_F,
>>     156						DA9062AA_SHUTDOWN_MASK);
>>     157		if (ret < 0)
>>     158			dev_alert(wdt->hw->dev, "Failed to shutdown (err = %d)\n",
>>     159				  ret);
>>     160	
>>     161		/* wait for reset to assert... */
>>     162		mdelay(500);
>>     163	
>>     164		return ret;
>>     165	}
>>     166	
>>
>> ---
>> 0-DAY kernel test infrastructure                 Open Source Technology Center
>> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation
> 
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-06 14:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-05 22:08 [linux-next:master 11029/12352] drivers/watchdog/da9062_wdt.c:155:8: error: implicit declaration of function 'i2c_smbus_write_byte_data'; did you mean 'i2c_set_clientdata'? kbuild test robot
2020-02-06  9:09 ` Marco Felsch
2020-02-06 13:12   ` Chen, Rong A
2020-02-06 14:39   ` Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.