[linux-next:master 10634/14055] 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

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   73748627df83aab934c81332ca83a44ab8c7b3e3
commit: 34b877d972bec8cbf397a57393317672cf92996f [10634/14055] mt76: mt7915: add thermal cooling device support
config: alpha-randconfig-r032-20210628 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.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/next/linux-next.git/commit/?id=34b877d972bec8cbf397a57393317672cf92996f
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 34b877d972bec8cbf397a57393317672cf92996f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha 

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

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@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


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

  Powered by Linux