* [PATCH] iwlwifi: fix building without CONFIG_THERMAL
@ 2019-09-19 11:55 Arnd Bergmann
2019-09-19 11:58 ` Luca Coelho
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2019-09-19 11:55 UTC (permalink / raw)
To: Johannes Berg, Emmanuel Grumbach, Luca Coelho,
Intel Linux Wireless, Kalle Valo
Cc: Arnd Bergmann, linux-wireless, netdev, linux-kernel
The iwl_mvm_send_temp_report_ths_cmd() function is now called without
CONFIG_THERMAL, but not defined:
ERROR: "iwl_mvm_send_temp_report_ths_cmd" [drivers/net/wireless/intel/iwlwifi/mvm/iwlmvm.ko] undefined!
Move that function out of the #ifdef as well and change it so
that empty data gets sent even if no thermal device was
registered.
Fixes: 242d9c8b9a93 ("iwlwifi: mvm: use FW thermal monitoring regardless of CONFIG_THERMAL")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
No idea if this does what was intended in the commit that introduced
the link failure, please see for youself.
---
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 4 ++--
drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
index 843d00bf2bd5..1b4139372e57 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
@@ -542,7 +542,6 @@ struct iwl_mvm_tt_mgmt {
bool throttle;
};
-#ifdef CONFIG_THERMAL
/**
*struct iwl_mvm_thermal_device - thermal zone related data
* @temp_trips: temperature thresholds for report
@@ -555,6 +554,7 @@ struct iwl_mvm_thermal_device {
struct thermal_zone_device *tzone;
};
+#ifdef CONFIG_THERMAL
/*
* struct iwl_mvm_cooling_device
* @cur_state: current state
@@ -1034,8 +1034,8 @@ struct iwl_mvm {
/* Thermal Throttling and CTkill */
struct iwl_mvm_tt_mgmt thermal_throttle;
-#ifdef CONFIG_THERMAL
struct iwl_mvm_thermal_device tz_device;
+#ifdef CONFIG_THERMAL
struct iwl_mvm_cooling_device cooling_dev;
#endif
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
index 32a708301cfc..6d717bb65ab7 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
@@ -549,7 +549,6 @@ int iwl_mvm_ctdp_command(struct iwl_mvm *mvm, u32 op, u32 state)
return 0;
}
-#ifdef CONFIG_THERMAL
static int compare_temps(const void *a, const void *b)
{
return ((s16)le16_to_cpu(*(__le16 *)a) -
@@ -564,7 +563,7 @@ int iwl_mvm_send_temp_report_ths_cmd(struct iwl_mvm *mvm)
lockdep_assert_held(&mvm->mutex);
if (!mvm->tz_device.tzone)
- return -EINVAL;
+ goto send;
/* The driver holds array of temperature trips that are unsorted
* and uncompressed, the FW should get it compressed and sorted
@@ -607,6 +606,7 @@ int iwl_mvm_send_temp_report_ths_cmd(struct iwl_mvm *mvm)
return ret;
}
+#ifdef CONFIG_THERMAL
static int iwl_mvm_tzone_get_temp(struct thermal_zone_device *device,
int *temperature)
{
--
2.20.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] iwlwifi: fix building without CONFIG_THERMAL
2019-09-19 11:55 [PATCH] iwlwifi: fix building without CONFIG_THERMAL Arnd Bergmann
@ 2019-09-19 11:58 ` Luca Coelho
0 siblings, 0 replies; 2+ messages in thread
From: Luca Coelho @ 2019-09-19 11:58 UTC (permalink / raw)
To: Arnd Bergmann, Johannes Berg, Emmanuel Grumbach,
Intel Linux Wireless, Kalle Valo
Cc: linux-wireless, netdev, linux-kernel
On Thu, 2019-09-19 at 13:55 +0200, Arnd Bergmann wrote:
> The iwl_mvm_send_temp_report_ths_cmd() function is now called without
> CONFIG_THERMAL, but not defined:
>
> ERROR: "iwl_mvm_send_temp_report_ths_cmd" [drivers/net/wireless/intel/iwlwifi/mvm/iwlmvm.ko] undefined!
>
> Move that function out of the #ifdef as well and change it so
> that empty data gets sent even if no thermal device was
> registered.
>
> Fixes: 242d9c8b9a93 ("iwlwifi: mvm: use FW thermal monitoring regardless of CONFIG_THERMAL")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> No idea if this does what was intended in the commit that introduced
> the link failure, please see for youself.
Thanks for the fix, Arnd! We already sent a fix for this though[1] and
Kalle has already queued it for v5.3.
[1] https://patchwork.kernel.org/patch/11150431/
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-19 11:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-19 11:55 [PATCH] iwlwifi: fix building without CONFIG_THERMAL Arnd Bergmann
2019-09-19 11:58 ` Luca Coelho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox