wifi: iwlwifi: fix thermal code compilation with -Werror=cast-qual

The compare_temps function in both mvm and mld dropped the const
qualifier in a cast in a way that makes -Werror=cast-qual unhappy. Add
the const to the cast to fix this.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Link: https://patch.msgid.link/20250506194102.3407967-8-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
This commit is contained in:
Benjamin Berg 2025-05-06 22:40:54 +03:00 committed by Miri Korenblit
parent c63a202895
commit 09019058f6
2 changed files with 4 additions and 4 deletions

View File

@ -116,8 +116,8 @@ static int iwl_mld_get_temp(struct iwl_mld *mld, s32 *temp)
static int compare_temps(const void *a, const void *b)
{
return ((s16)le16_to_cpu(*(__le16 *)a) -
(s16)le16_to_cpu(*(__le16 *)b));
return ((s16)le16_to_cpu(*(const __le16 *)a) -
(s16)le16_to_cpu(*(const __le16 *)b));
}
struct iwl_trip_walk_data {

View File

@ -552,8 +552,8 @@ int iwl_mvm_ctdp_command(struct iwl_mvm *mvm, u32 op, u32 state)
#ifdef CONFIG_THERMAL
static int compare_temps(const void *a, const void *b)
{
return ((s16)le16_to_cpu(*(__le16 *)a) -
(s16)le16_to_cpu(*(__le16 *)b));
return ((s16)le16_to_cpu(*(const __le16 *)a) -
(s16)le16_to_cpu(*(const __le16 *)b));
}
struct iwl_trip_walk_data {