net/mac80211/trace.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
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
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
© 2016 - 2025 Red Hat, Inc.