LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* drivers/net/wireless/mediatek/mt76/mt7915/init.c:134:41: warning: passing argument 1 of 'thermal_cooling_device_register' discards 'const' qualifier from pointer target type
@ 2021-08-13  7:19 kernel test robot
  2021-08-13  8:42 ` Ryder Lee (李庚諺)
  2021-08-13 16:26 ` Ryder Lee
  0 siblings, 2 replies; 3+ messages in thread
From: kernel test robot @ 2021-08-13  7:19 UTC (permalink / raw)
  To: Ryder Lee; +Cc: kbuild-all, linux-kernel, Felix Fietkau

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

Hi Ryder,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f8e6dfc64f6135d1b6c5215c14cd30b9b60a0008
commit: 34b877d972bec8cbf397a57393317672cf92996f mt76: mt7915: add thermal cooling device support
date:   8 weeks ago
config: x86_64-buildonly-randconfig-r001-20210812 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=34b877d972bec8cbf397a57393317672cf92996f
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 34b877d972bec8cbf397a57393317672cf92996f
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

   drivers/net/wireless/mediatek/mt76/mt7915/init.c: In function 'mt7915_thermal_init':
>> drivers/net/wireless/mediatek/mt76/mt7915/init.c:134:41: warning: passing argument 1 of 'thermal_cooling_device_register' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     134 |  cdev = thermal_cooling_device_register(wiphy_name(wiphy), phy,
         |                                         ^~~~~~~~~~~~~~~~~
   In file included from drivers/net/wireless/mediatek/mt76/mt7915/init.c:7:
   include/linux/thermal.h:407:39: note: expected 'char *' but argument is of type 'const char *'
     407 | thermal_cooling_device_register(char *type, void *devdata,
         |                                 ~~~~~~^~~~


vim +134 drivers/net/wireless/mediatek/mt76/mt7915/init.c

   127	
   128	static int mt7915_thermal_init(struct mt7915_phy *phy)
   129	{
   130		struct wiphy *wiphy = phy->mt76->hw->wiphy;
   131		struct thermal_cooling_device *cdev;
   132		struct device *hwmon;
   133	
 > 134		cdev = thermal_cooling_device_register(wiphy_name(wiphy), phy,
   135						       &mt7915_thermal_ops);
   136		if (!IS_ERR(cdev)) {
   137			if (sysfs_create_link(&wiphy->dev.kobj, &cdev->device.kobj,
   138					      "cooling_device") < 0)
   139				thermal_cooling_device_unregister(cdev);
   140			else
   141				phy->cdev = cdev;
   142		}
   143	
   144		if (!IS_REACHABLE(CONFIG_HWMON))
   145			return 0;
   146	
   147		hwmon = devm_hwmon_device_register_with_groups(&wiphy->dev,
   148							       wiphy_name(wiphy), phy,
   149							       mt7915_hwmon_groups);
   150		if (IS_ERR(hwmon))
   151			return PTR_ERR(hwmon);
   152	
   153		return 0;
   154	}
   155	

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

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

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

* RE: drivers/net/wireless/mediatek/mt76/mt7915/init.c:134:41: warning: passing argument 1 of 'thermal_cooling_device_register' discards 'const' qualifier from pointer target type
  2021-08-13  7:19 drivers/net/wireless/mediatek/mt76/mt7915/init.c:134:41: warning: passing argument 1 of 'thermal_cooling_device_register' discards 'const' qualifier from pointer target type kernel test robot
@ 2021-08-13  8:42 ` Ryder Lee (李庚諺)
  2021-08-13 16:26 ` Ryder Lee
  1 sibling, 0 replies; 3+ messages in thread
From: Ryder Lee (李庚諺) @ 2021-08-13  8:42 UTC (permalink / raw)
  To: kernel test robot; +Cc: kbuild-all, linux-kernel, Felix Fietkau


The cause is https://lore.kernel.org/lkml/ABDAFCAB-8DF5-41A7-B1E0-4953A9BF32B3@gmail.com/T/


-----Original Message-----
From: kernel test robot [mailto:lkp@intel.com] 
Sent: Friday, August 13, 2021 12:20 AM
To: Ryder Lee <Ryder.Lee@mediatek.com>
Cc: kbuild-all@lists.01.org; linux-kernel@vger.kernel.org; Felix Fietkau <nbd@nbd.name>
Subject: drivers/net/wireless/mediatek/mt76/mt7915/init.c:134:41: warning: passing argument 1 of 'thermal_cooling_device_register' discards 'const' qualifier from pointer target type

Hi Ryder,

FYI, the error/warning still remains.

tree:   https://urldefense.com/v3/__https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git__;!!CTRNKA9wMg0ARbw!1yGhyZ2zcgDSAZInyFCpTWQq7wm0KK7MwoYWKEME_DrayfcYfxh4i9dnufVN9C-c$  master
head:   f8e6dfc64f6135d1b6c5215c14cd30b9b60a0008
commit: 34b877d972bec8cbf397a57393317672cf92996f mt76: mt7915: add thermal cooling device support
date:   8 weeks ago
config: x86_64-buildonly-randconfig-r001-20210812 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://urldefense.com/v3/__https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=34b877d972bec8cbf397a57393317672cf92996f__;!!CTRNKA9wMg0ARbw!1yGhyZ2zcgDSAZInyFCpTWQq7wm0KK7MwoYWKEME_DrayfcYfxh4i9dnueYlmjdK$ 
        git remote add linus https://urldefense.com/v3/__https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git__;!!CTRNKA9wMg0ARbw!1yGhyZ2zcgDSAZInyFCpTWQq7wm0KK7MwoYWKEME_DrayfcYfxh4i9dnufVN9C-c$ 
        git fetch --no-tags linus master
        git checkout 34b877d972bec8cbf397a57393317672cf92996f
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

   drivers/net/wireless/mediatek/mt76/mt7915/init.c: In function 'mt7915_thermal_init':
>> drivers/net/wireless/mediatek/mt76/mt7915/init.c:134:41: warning: 
>> passing argument 1 of 'thermal_cooling_device_register' discards 
>> 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     134 |  cdev = thermal_cooling_device_register(wiphy_name(wiphy), phy,
         |                                         ^~~~~~~~~~~~~~~~~
   In file included from drivers/net/wireless/mediatek/mt76/mt7915/init.c:7:
   include/linux/thermal.h:407:39: note: expected 'char *' but argument is of type 'const char *'
     407 | thermal_cooling_device_register(char *type, void *devdata,
         |                                 ~~~~~~^~~~


vim +134 drivers/net/wireless/mediatek/mt76/mt7915/init.c

   127	
   128	static int mt7915_thermal_init(struct mt7915_phy *phy)
   129	{
   130		struct wiphy *wiphy = phy->mt76->hw->wiphy;
   131		struct thermal_cooling_device *cdev;
   132		struct device *hwmon;
   133	
 > 134		cdev = thermal_cooling_device_register(wiphy_name(wiphy), phy,
   135						       &mt7915_thermal_ops);
   136		if (!IS_ERR(cdev)) {
   137			if (sysfs_create_link(&wiphy->dev.kobj, &cdev->device.kobj,
   138					      "cooling_device") < 0)
   139				thermal_cooling_device_unregister(cdev);
   140			else
   141				phy->cdev = cdev;
   142		}
   143	
   144		if (!IS_REACHABLE(CONFIG_HWMON))
   145			return 0;
   146	
   147		hwmon = devm_hwmon_device_register_with_groups(&wiphy->dev,
   148							       wiphy_name(wiphy), phy,
   149							       mt7915_hwmon_groups);
   150		if (IS_ERR(hwmon))
   151			return PTR_ERR(hwmon);
   152	
   153		return 0;
   154	}
   155	

---
0-DAY CI Kernel Test Service, Intel Corporation https://urldefense.com/v3/__https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org__;!!CTRNKA9wMg0ARbw!1yGhyZ2zcgDSAZInyFCpTWQq7wm0KK7MwoYWKEME_DrayfcYfxh4i9dnuV9Db3hd$ 

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

* Re: drivers/net/wireless/mediatek/mt76/mt7915/init.c:134:41: warning: passing argument 1 of 'thermal_cooling_device_register' discards 'const' qualifier from pointer target type
  2021-08-13  7:19 drivers/net/wireless/mediatek/mt76/mt7915/init.c:134:41: warning: passing argument 1 of 'thermal_cooling_device_register' discards 'const' qualifier from pointer target type kernel test robot
  2021-08-13  8:42 ` Ryder Lee (李庚諺)
@ 2021-08-13 16:26 ` Ryder Lee
  1 sibling, 0 replies; 3+ messages in thread
From: Ryder Lee @ 2021-08-13 16:26 UTC (permalink / raw)
  To: kernel test robot; +Cc: kbuild-all, linux-kernel, Felix Fietkau

On Fri, 2021-08-13 at 15:19 +0800, kernel test robot wrote:
> Hi Ryder,
> 
> FYI, the error/warning still remains.
> 
> tree:   
> https://urldefense.com/v3/__https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git__;!!CTRNKA9wMg0ARbw!1yGhyZ2zcgDSAZInyFCpTWQq7wm0KK7MwoYWKEME_DrayfcYfxh4i9dnufVN9C-c$
>   master
> head:   f8e6dfc64f6135d1b6c5215c14cd30b9b60a0008
> commit: 34b877d972bec8cbf397a57393317672cf92996f mt76: mt7915: add
> thermal cooling device support
> date:   8 weeks ago
> config: x86_64-buildonly-randconfig-r001-20210812 (attached as
> .config)
> compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
> reproduce (this is a W=1 build):
>         # 
> https://urldefense.com/v3/__https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=34b877d972bec8cbf397a57393317672cf92996f__;!!CTRNKA9wMg0ARbw!1yGhyZ2zcgDSAZInyFCpTWQq7wm0KK7MwoYWKEME_DrayfcYfxh4i9dnueYlmjdK$
>  
>         git remote add linus 
> https://urldefense.com/v3/__https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git__;!!CTRNKA9wMg0ARbw!1yGhyZ2zcgDSAZInyFCpTWQq7wm0KK7MwoYWKEME_DrayfcYfxh4i9dnufVN9C-c$
>  
>         git fetch --no-tags linus master
>         git checkout 34b877d972bec8cbf397a57393317672cf92996f
>         # save the attached .config to linux build tree
>         make W=1 ARCH=x86_64 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
>    drivers/net/wireless/mediatek/mt76/mt7915/init.c: In function
> 'mt7915_thermal_init':
> > > drivers/net/wireless/mediatek/mt76/mt7915/init.c:134:41: warning:
> > > passing argument 1 of 'thermal_cooling_device_register' discards
> > > 'const' qualifier from pointer target type [-Wdiscarded-
> > > qualifiers]
> 
>      134 |  cdev = thermal_cooling_device_register(wiphy_name(wiphy),
> phy,
>          |                                         ^~~~~~~~~~~~~~~~~
>    In file included from
> drivers/net/wireless/mediatek/mt76/mt7915/init.c:7:
>    include/linux/thermal.h:407:39: note: expected 'char *' but
> argument is of type 'const char *'
>      407 | thermal_cooling_device_register(char *type, void *devdata,
>          |                                 ~~~~~~^~~~
> 
> 
> vim +134 drivers/net/wireless/mediatek/mt76/mt7915/init.c
> 
>    127	
>    128	static int mt7915_thermal_init(struct mt7915_phy *phy)
>    129	{
>    130		struct wiphy *wiphy = phy->mt76->hw->wiphy;
>    131		struct thermal_cooling_device *cdev;
>    132		struct device *hwmon;
>    133	
>  > 134		cdev =
> thermal_cooling_device_register(wiphy_name(wiphy), phy,
>    135						       &mt7915_
> thermal_ops);
>    136		if (!IS_ERR(cdev)) {
>    137			if (sysfs_create_link(&wiphy->dev.kobj, 
> &cdev->device.kobj,
>    138					      "cooling_device")
> < 0)
>    139				thermal_cooling_device_unregist
> er(cdev);
>    140			else
>    141				phy->cdev = cdev;
>    142		}
>    143	
>    144		if (!IS_REACHABLE(CONFIG_HWMON))
>    145			return 0;
>    146	
>    147		hwmon =
> devm_hwmon_device_register_with_groups(&wiphy->dev,
>    148							       
> wiphy_name(wiphy), phy,
>    149							       
> mt7915_hwmon_groups);
>    150		if (IS_ERR(hwmon))
>    151			return PTR_ERR(hwmon);
>    152	
>    153		return 0;
>    154	}
>    155	
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> 
https://urldefense.com/v3/__https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org__;!!CTRNKA9wMg0ARbw!1yGhyZ2zcgDSAZInyFCpTWQq7wm0KK7MwoYWKEME_DrayfcYfxh4i9dnuV9Db3hd$

The cause is 
https://lore.kernel.org/lkml/ABDAFCAB-8DF5-41A7-B1E0-4953A9BF32B3@gmail.com/T/


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

end of thread, other threads:[~2021-08-13 16:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-13  7:19 drivers/net/wireless/mediatek/mt76/mt7915/init.c:134:41: warning: passing argument 1 of 'thermal_cooling_device_register' discards 'const' qualifier from pointer target type kernel test robot
2021-08-13  8:42 ` Ryder Lee (李庚諺)
2021-08-13 16:26 ` Ryder Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).