mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mac80211: fix unsigned int link_id format specifiers in trace.h
@ 2025-07-10 14:50 WangYuli
  2025-07-10 15:04 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: WangYuli @ 2025-07-10 14:50 UTC (permalink / raw)
  To: johannes
  Cc: linux-wireless, linux-kernel, zhanjun, niecheng1, guanwentao, WangYuli

Fix format specifiers for link_id fields declared as 'unsigned int'
to use %u instead of %d. This affects several trace events where
link_id was incorrectly formatted as signed integer.

Signed-off-by: WangYuli <wangyuli@uniontech.com>
---
 net/mac80211/trace.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
index 72fad8ea8bb9..cd1e0c4dfe2f 100644
--- a/net/mac80211/trace.h
+++ b/net/mac80211/trace.h
@@ -1070,7 +1070,7 @@ TRACE_EVENT(drv_conf_tx,
 	),
 
 	TP_printk(
-		LOCAL_PR_FMT  VIF_PR_FMT  " link_id: %d, AC:%d",
+		LOCAL_PR_FMT  VIF_PR_FMT  " link_id: %u, AC:%d",
 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->link_id, __entry->ac
 	)
 );
@@ -1785,7 +1785,7 @@ DECLARE_EVENT_CLASS(local_sdata_chanctx,
 	),
 
 	TP_printk(
-		LOCAL_PR_FMT VIF_PR_FMT " link_id:%d" CHANCTX_PR_FMT,
+		LOCAL_PR_FMT VIF_PR_FMT " link_id:%u" CHANCTX_PR_FMT,
 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->link_id, CHANCTX_PR_ARG
 	)
 );
@@ -2194,7 +2194,7 @@ TRACE_EVENT(drv_get_txpower,
 	),
 
 	TP_printk(
-		LOCAL_PR_FMT VIF_PR_FMT " link_id:%d dbm:%d ret:%d",
+		LOCAL_PR_FMT VIF_PR_FMT " link_id:%u dbm:%d ret:%d",
 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->link_id, __entry->dbm, __entry->ret
 	)
 );
@@ -2912,7 +2912,7 @@ TRACE_EVENT(api_chswitch_done,
 	),
 
 	TP_printk(
-		VIF_PR_FMT " success=%d link_id=%d",
+		VIF_PR_FMT " success=%d link_id=%u",
 		VIF_PR_ARG, __entry->success, __entry->link_id
 	)
 );
-- 
2.50.0


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

* Re: [PATCH] mac80211: fix unsigned int link_id format specifiers in trace.h
  2025-07-10 14:50 [PATCH] mac80211: fix unsigned int link_id format specifiers in trace.h WangYuli
@ 2025-07-10 15:04 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2025-07-10 15:04 UTC (permalink / raw)
  To: WangYuli; +Cc: linux-wireless, linux-kernel, zhanjun, niecheng1, guanwentao

On Thu, 2025-07-10 at 22:50 +0800, WangYuli wrote:
> Fix format specifiers for link_id fields declared as 'unsigned int'
> to use %u instead of %d. This affects several trace events where
> link_id was incorrectly formatted as signed integer.
> 

Why should we care?

johannes

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

end of thread, other threads:[~2025-07-10 15:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-10 14:50 [PATCH] mac80211: fix unsigned int link_id format specifiers in trace.h WangYuli
2025-07-10 15:04 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®