tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 7fef2edf7cc753b51f7ccc74993971b0a9c81eca commit: 34b877d972bec8cbf397a57393317672cf92996f mt76: mt7915: add thermal cooling device support date: 3 weeks ago config: powerpc-randconfig-r003-20210713 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8d69635ed9ecf36fd0ca85906bfde17949671cbe) 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 # install powerpc cross compiling tool for clang build # apt-get install binutils-powerpc-linux-gnu # 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 COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from drivers/net/wireless/mediatek/mt76/mt7915/init.c:4: In file included from include/linux/etherdevice.h:20: In file included from include/linux/if_ether.h:19: In file included from include/linux/skbuff.h:13: In file included from include/linux/kernel.h:12: In file included from include/linux/bitops.h:32: In file included from arch/powerpc/include/asm/bitops.h:62: arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redefined [-Wmacro-redefined] #define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory") ^ :309:9: note: previous definition is here #define __lwsync __builtin_ppc_lwsync ^ >> drivers/net/wireless/mediatek/mt76/mt7915/init.c:134:41: error: passing 'const char *' to parameter of type 'char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] cdev = thermal_cooling_device_register(wiphy_name(wiphy), phy, ^~~~~~~~~~~~~~~~~ include/linux/thermal.h:407:39: note: passing argument to parameter 'type' here thermal_cooling_device_register(char *type, void *devdata, ^ 1 warning and 1 error generated. 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