mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
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:
parent
c63a202895
commit
09019058f6
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user