linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wifi: mac80211: fix incorrect type for ret
@ 2025-08-25  2:29 Liao Yuanhong
  2025-08-26 15:00 ` Jeff Johnson
  0 siblings, 1 reply; 2+ messages in thread
From: Liao Yuanhong @ 2025-08-25  2:29 UTC (permalink / raw)
  To: Johannes Berg, open list:MAC80211, open list; +Cc: Liao Yuanhong

The variable ret is declared as a u32 type, but it is assigned a value
of -EOPNOTSUPP. Since unsigned types cannot correctly represent negative
values, the type of ret should be changed to int.

Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
---
 net/mac80211/driver-ops.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 181bcb34b795..55105d238d6b 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -1416,7 +1416,7 @@ drv_get_ftm_responder_stats(struct ieee80211_local *local,
 			    struct ieee80211_sub_if_data *sdata,
 			    struct cfg80211_ftm_responder_stats *ftm_stats)
 {
-	u32 ret = -EOPNOTSUPP;
+	int ret = -EOPNOTSUPP;
 
 	might_sleep();
 	lockdep_assert_wiphy(local->hw.wiphy);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] wifi: mac80211: fix incorrect type for ret
  2025-08-25  2:29 [PATCH] wifi: mac80211: fix incorrect type for ret Liao Yuanhong
@ 2025-08-26 15:00 ` Jeff Johnson
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Johnson @ 2025-08-26 15:00 UTC (permalink / raw)
  To: Liao Yuanhong, Johannes Berg, open list:MAC80211, open list

On 8/24/2025 7:29 PM, Liao Yuanhong wrote:
> The variable ret is declared as a u32 type, but it is assigned a value
> of -EOPNOTSUPP. Since unsigned types cannot correctly represent negative
> values, the type of ret should be changed to int.

not only that, but drv_get_ftm_responder_stats() is declared to return int

> 
> Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>

Reviewed-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-08-26 15:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-25  2:29 [PATCH] wifi: mac80211: fix incorrect type for ret Liao Yuanhong
2025-08-26 15:00 ` Jeff Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).