tree: https://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild.git kbuild head: 5921be792da61a84e0b53ed64908aab8145c859d commit: cf4f21938e13ea1533ebdcb21c46f1d998a44ee8 [2/3] kbuild: Allow to specify composite modules with modname-m config: xtensa-allmodconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout cf4f21938e13ea1533ebdcb21c46f1d998a44ee8 # save the attached .config to linux build tree make.cross ARCH=xtensa All errors (new ones prefixed by >>): >> drivers/net/wireless/ath/ath10k/thermal.c:119:6: error: redefinition of 'ath10k_thermal_event_temperature' void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature) ^ In file included from drivers/net/wireless/ath/ath10k/core.h:37:0, from drivers/net/wireless/ath/ath10k/thermal.c:22: drivers/net/wireless/ath/ath10k/thermal.h:54:20: note: previous definition of 'ath10k_thermal_event_temperature' was here static inline void ath10k_thermal_event_temperature(struct ath10k *ar, ^ >> drivers/net/wireless/ath/ath10k/thermal.c:136:6: error: redefinition of 'ath10k_thermal_set_throttling' void ath10k_thermal_set_throttling(struct ath10k *ar) ^ In file included from drivers/net/wireless/ath/ath10k/core.h:37:0, from drivers/net/wireless/ath/ath10k/thermal.c:22: drivers/net/wireless/ath/ath10k/thermal.h:59:20: note: previous definition of 'ath10k_thermal_set_throttling' was here static inline void ath10k_thermal_set_throttling(struct ath10k *ar) ^ >> drivers/net/wireless/ath/ath10k/thermal.c:162:5: error: redefinition of 'ath10k_thermal_register' int ath10k_thermal_register(struct ath10k *ar) ^ In file included from drivers/net/wireless/ath/ath10k/core.h:37:0, from drivers/net/wireless/ath/ath10k/thermal.c:22: drivers/net/wireless/ath/ath10k/thermal.h:45:19: note: previous definition of 'ath10k_thermal_register' was here static inline int ath10k_thermal_register(struct ath10k *ar) ^ >> drivers/net/wireless/ath/ath10k/thermal.c:216:6: error: redefinition of 'ath10k_thermal_unregister' void ath10k_thermal_unregister(struct ath10k *ar) ^ In file included from drivers/net/wireless/ath/ath10k/core.h:37:0, from drivers/net/wireless/ath/ath10k/thermal.c:22: drivers/net/wireless/ath/ath10k/thermal.h:50:20: note: previous definition of 'ath10k_thermal_unregister' was here static inline void ath10k_thermal_unregister(struct ath10k *ar) ^ vim +/ath10k_thermal_event_temperature +119 drivers/net/wireless/ath/ath10k/thermal.c 6d481616 Rajkumar Manoharan 2015-01-13 113 ret = snprintf(buf, PAGE_SIZE, "%d\n", temperature * 1000); ac2953fc Rajkumar Manoharan 2014-12-17 114 out: ac2953fc Rajkumar Manoharan 2014-12-17 115 mutex_unlock(&ar->conf_mutex); ac2953fc Rajkumar Manoharan 2014-12-17 116 return ret; ac2953fc Rajkumar Manoharan 2014-12-17 117 } ac2953fc Rajkumar Manoharan 2014-12-17 118 ac2953fc Rajkumar Manoharan 2014-12-17 @119 void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature) ac2953fc Rajkumar Manoharan 2014-12-17 120 { ac2953fc Rajkumar Manoharan 2014-12-17 121 spin_lock_bh(&ar->data_lock); ac2953fc Rajkumar Manoharan 2014-12-17 122 ar->thermal.temperature = temperature; ac2953fc Rajkumar Manoharan 2014-12-17 123 spin_unlock_bh(&ar->data_lock); ac2953fc Rajkumar Manoharan 2014-12-17 124 complete(&ar->thermal.wmi_sync); ac2953fc Rajkumar Manoharan 2014-12-17 125 } ac2953fc Rajkumar Manoharan 2014-12-17 126 ac2953fc Rajkumar Manoharan 2014-12-17 127 static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, ath10k_thermal_show_temp, ac2953fc Rajkumar Manoharan 2014-12-17 128 NULL, 0); ac2953fc Rajkumar Manoharan 2014-12-17 129 ac2953fc Rajkumar Manoharan 2014-12-17 130 static struct attribute *ath10k_hwmon_attrs[] = { ac2953fc Rajkumar Manoharan 2014-12-17 131 &sensor_dev_attr_temp1_input.dev_attr.attr, ac2953fc Rajkumar Manoharan 2014-12-17 132 NULL, ac2953fc Rajkumar Manoharan 2014-12-17 133 }; ac2953fc Rajkumar Manoharan 2014-12-17 134 ATTRIBUTE_GROUPS(ath10k_hwmon); ac2953fc Rajkumar Manoharan 2014-12-17 135 8515b5c7 Rajkumar Manoharan 2015-03-15 @136 void ath10k_thermal_set_throttling(struct ath10k *ar) 8515b5c7 Rajkumar Manoharan 2015-03-15 137 { 8515b5c7 Rajkumar Manoharan 2015-03-15 138 u32 period, duration, enabled; 8515b5c7 Rajkumar Manoharan 2015-03-15 139 int ret; 8515b5c7 Rajkumar Manoharan 2015-03-15 140 8515b5c7 Rajkumar Manoharan 2015-03-15 141 lockdep_assert_held(&ar->conf_mutex); 8515b5c7 Rajkumar Manoharan 2015-03-15 142 d600a6d7 Michal Kazior 2015-03-24 143 if (!ar->wmi.ops->gen_pdev_set_quiet_mode) d600a6d7 Michal Kazior 2015-03-24 144 return; d600a6d7 Michal Kazior 2015-03-24 145 9936fa59 Rajkumar Manoharan 2015-03-15 146 if (ar->state != ATH10K_STATE_ON) 9936fa59 Rajkumar Manoharan 2015-03-15 147 return; 9936fa59 Rajkumar Manoharan 2015-03-15 148 8515b5c7 Rajkumar Manoharan 2015-03-15 149 period = ar->thermal.quiet_period; 8515b5c7 Rajkumar Manoharan 2015-03-15 150 duration = (period * ar->thermal.throttle_state) / 100; 8515b5c7 Rajkumar Manoharan 2015-03-15 151 enabled = duration ? 1 : 0; 8515b5c7 Rajkumar Manoharan 2015-03-15 152 8515b5c7 Rajkumar Manoharan 2015-03-15 153 ret = ath10k_wmi_pdev_set_quiet_mode(ar, period, duration, 8515b5c7 Rajkumar Manoharan 2015-03-15 154 ATH10K_QUIET_START_OFFSET, 8515b5c7 Rajkumar Manoharan 2015-03-15 155 enabled); 8515b5c7 Rajkumar Manoharan 2015-03-15 156 if (ret) { 8515b5c7 Rajkumar Manoharan 2015-03-15 157 ath10k_warn(ar, "failed to set quiet mode period %u duarion %u enabled %u ret %d\n", 8515b5c7 Rajkumar Manoharan 2015-03-15 158 period, duration, enabled, ret); 8515b5c7 Rajkumar Manoharan 2015-03-15 159 } 8515b5c7 Rajkumar Manoharan 2015-03-15 160 } 8515b5c7 Rajkumar Manoharan 2015-03-15 161 fe6f36d6 Rajkumar Manoharan 2014-12-17 @162 int ath10k_thermal_register(struct ath10k *ar) fe6f36d6 Rajkumar Manoharan 2014-12-17 163 { fe6f36d6 Rajkumar Manoharan 2014-12-17 164 struct thermal_cooling_device *cdev; ac2953fc Rajkumar Manoharan 2014-12-17 165 struct device *hwmon_dev; fe6f36d6 Rajkumar Manoharan 2014-12-17 166 int ret; fe6f36d6 Rajkumar Manoharan 2014-12-17 167 fe6f36d6 Rajkumar Manoharan 2014-12-17 168 cdev = thermal_cooling_device_register("ath10k_thermal", ar, fe6f36d6 Rajkumar Manoharan 2014-12-17 169 &ath10k_thermal_ops); fe6f36d6 Rajkumar Manoharan 2014-12-17 170 fe6f36d6 Rajkumar Manoharan 2014-12-17 171 if (IS_ERR(cdev)) { fe6f36d6 Rajkumar Manoharan 2014-12-17 172 ath10k_err(ar, "failed to setup thermal device result: %ld\n", fe6f36d6 Rajkumar Manoharan 2014-12-17 173 PTR_ERR(cdev)); fe6f36d6 Rajkumar Manoharan 2014-12-17 174 return -EINVAL; fe6f36d6 Rajkumar Manoharan 2014-12-17 175 } fe6f36d6 Rajkumar Manoharan 2014-12-17 176 fe6f36d6 Rajkumar Manoharan 2014-12-17 177 ret = sysfs_create_link(&ar->dev->kobj, &cdev->device.kobj, fe6f36d6 Rajkumar Manoharan 2014-12-17 178 "cooling_device"); fe6f36d6 Rajkumar Manoharan 2014-12-17 179 if (ret) { 7e47e8e3 Rajkumar Manoharan 2015-03-12 180 ath10k_err(ar, "failed to create cooling device symlink\n"); fe6f36d6 Rajkumar Manoharan 2014-12-17 181 goto err_cooling_destroy; fe6f36d6 Rajkumar Manoharan 2014-12-17 182 } fe6f36d6 Rajkumar Manoharan 2014-12-17 183 fe6f36d6 Rajkumar Manoharan 2014-12-17 184 ar->thermal.cdev = cdev; 63fb32df Rajkumar Manoharan 2015-03-15 185 ar->thermal.quiet_period = ATH10K_QUIET_PERIOD_DEFAULT; ac2953fc Rajkumar Manoharan 2014-12-17 186 ac2953fc Rajkumar Manoharan 2014-12-17 187 /* Do not register hwmon device when temperature reading is not ac2953fc Rajkumar Manoharan 2014-12-17 188 * supported by firmware ac2953fc Rajkumar Manoharan 2014-12-17 189 */ ac2953fc Rajkumar Manoharan 2014-12-17 190 if (ar->wmi.op_version != ATH10K_FW_WMI_OP_VERSION_10_2_4) ac2953fc Rajkumar Manoharan 2014-12-17 191 return 0; ac2953fc Rajkumar Manoharan 2014-12-17 192 96bba983 Kalle Valo 2015-01-07 193 /* Avoid linking error on devm_hwmon_device_register_with_groups, I 96bba983 Kalle Valo 2015-01-07 194 * guess linux/hwmon.h is missing proper stubs. */ a4031afb Rajkumar Manoharan 2015-01-13 195 if (!config_enabled(CONFIG_HWMON)) 96bba983 Kalle Valo 2015-01-07 196 return 0; 96bba983 Kalle Valo 2015-01-07 197 ac2953fc Rajkumar Manoharan 2014-12-17 198 hwmon_dev = devm_hwmon_device_register_with_groups(ar->dev, ac2953fc Rajkumar Manoharan 2014-12-17 199 "ath10k_hwmon", ar, ac2953fc Rajkumar Manoharan 2014-12-17 200 ath10k_hwmon_groups); ac2953fc Rajkumar Manoharan 2014-12-17 201 if (IS_ERR(hwmon_dev)) { ac2953fc Rajkumar Manoharan 2014-12-17 202 ath10k_err(ar, "failed to register hwmon device: %ld\n", ac2953fc Rajkumar Manoharan 2014-12-17 203 PTR_ERR(hwmon_dev)); ac2953fc Rajkumar Manoharan 2014-12-17 204 ret = -EINVAL; ac2953fc Rajkumar Manoharan 2014-12-17 205 goto err_remove_link; ac2953fc Rajkumar Manoharan 2014-12-17 206 } fe6f36d6 Rajkumar Manoharan 2014-12-17 207 return 0; fe6f36d6 Rajkumar Manoharan 2014-12-17 208 ac2953fc Rajkumar Manoharan 2014-12-17 209 err_remove_link: 7e47e8e3 Rajkumar Manoharan 2015-03-12 210 sysfs_remove_link(&ar->dev->kobj, "cooling_device"); fe6f36d6 Rajkumar Manoharan 2014-12-17 211 err_cooling_destroy: fe6f36d6 Rajkumar Manoharan 2014-12-17 212 thermal_cooling_device_unregister(cdev); fe6f36d6 Rajkumar Manoharan 2014-12-17 213 return ret; fe6f36d6 Rajkumar Manoharan 2014-12-17 214 } fe6f36d6 Rajkumar Manoharan 2014-12-17 215 fe6f36d6 Rajkumar Manoharan 2014-12-17 @216 void ath10k_thermal_unregister(struct ath10k *ar) fe6f36d6 Rajkumar Manoharan 2014-12-17 217 { fe6f36d6 Rajkumar Manoharan 2014-12-17 218 sysfs_remove_link(&ar->dev->kobj, "cooling_device"); 83cfce87 Mohammed Shafi Shajakhan 2015-10-08 219 thermal_cooling_device_unregister(ar->thermal.cdev); :::::: The code at line 119 was first introduced by commit :::::: ac2953fcc35871181bfafb11238b757ae1a4ce9f ath10k: add thermal sensor device support :::::: TO: Rajkumar Manoharan <rmanohar@xxxxxxxxxxxxxxxx> :::::: CC: Kalle Valo <kvalo@xxxxxxxxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: Binary data