* [PATCH 0/2] mac80211: hide tracepoint definition
@ 2026-10-17 15:55 Omer El Idrissi
2026-10-17 15:55 ` [PATCH 1/2] mac80211: move static function from header to referenced file Omer El Idrissi
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Omer El Idrissi @ 2026-10-17 15:55 UTC (permalink / raw)
To: johannes; +Cc: linux-wireless, linux-kernel, Omer El Idrissi
This patch series does the following:
- Move static function that uses tracepoint from header file
net/mac80211/driver-ops.h to net/mac80211/debugfs.c where it's called
- hides tracepoint definition flagged by UT=1 behind
CONFIG_MAC80211_DEBUGFS
Omer El Idrissi (2):
mac80211: move static function from header to referenced file
mac80211: hide drv_get_stats tracepoint with ifdef guard
net/mac80211/debugfs.c | 15 +++++++++++++++
net/mac80211/driver-ops.h | 15 ---------------
net/mac80211/trace.h | 4 ++++
3 files changed, 19 insertions(+), 15 deletions(-)
--
2.53.0
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 1/2] mac80211: move static function from header to referenced file 2026-10-17 15:55 [PATCH 0/2] mac80211: hide tracepoint definition Omer El Idrissi @ 2026-10-17 15:55 ` Omer El Idrissi 2026-10-30 1:31 ` Jeff Johnson 2026-10-17 15:55 ` [PATCH 2/2] mac80211: hide drv_get_stats tracepoint with ifdef guard Omer El Idrissi 2026-10-24 14:31 ` [PATCH 0/2] mac80211: hide tracepoint definition Omer El Idrissi 2 siblings, 1 reply; 6+ messages in thread From: Omer El Idrissi @ 2026-10-17 15:55 UTC (permalink / raw) To: johannes; +Cc: linux-wireless, linux-kernel, Omer El Idrissi Move static function from header file to only c file it's used in. Signed-off-by: Omer El Idrissi <omer.e.idrissi@gmail.com> --- net/mac80211/debugfs.c | 15 +++++++++++++++ net/mac80211/driver-ops.h | 15 --------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c index e38631d7cfb4..cce8aab1dfa6 100644 --- a/net/mac80211/debugfs.c +++ b/net/mac80211/debugfs.c @@ -589,6 +589,21 @@ DEBUGFS_READONLY_FILE_OPS(misc); /* statistics stuff */ +static inline int drv_get_stats(struct ieee80211_local *local, + struct ieee80211_low_level_stats *stats) +{ + int ret = -EOPNOTSUPP; + + might_sleep(); + lockdep_assert_wiphy(local->hw.wiphy); + + if (local->ops->get_stats) + ret = local->ops->get_stats(&local->hw, stats); + trace_drv_get_stats(local, stats, ret); + + return ret; +} + static ssize_t format_devstat_counter(struct ieee80211_local *local, char __user *userbuf, size_t count, loff_t *ppos, diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index f1c0b87fddd5..49654958531d 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h @@ -364,21 +364,6 @@ static inline void drv_sw_scan_complete(struct ieee80211_local *local, trace_drv_return_void(local); } -static inline int drv_get_stats(struct ieee80211_local *local, - struct ieee80211_low_level_stats *stats) -{ - int ret = -EOPNOTSUPP; - - might_sleep(); - lockdep_assert_wiphy(local->hw.wiphy); - - if (local->ops->get_stats) - ret = local->ops->get_stats(&local->hw, stats); - trace_drv_get_stats(local, stats, ret); - - return ret; -} - static inline void drv_get_key_seq(struct ieee80211_local *local, struct ieee80211_key *key, struct ieee80211_key_seq *seq) -- 2.53.0 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] mac80211: move static function from header to referenced file 2026-10-17 15:55 ` [PATCH 1/2] mac80211: move static function from header to referenced file Omer El Idrissi @ 2026-10-30 1:31 ` Jeff Johnson 2026-10-30 13:21 ` Omer El Idrissi 0 siblings, 1 reply; 6+ messages in thread From: Jeff Johnson @ 2026-10-30 1:31 UTC (permalink / raw) To: Omer El Idrissi, johannes; +Cc: linux-wireless, linux-kernel On 10/17/2026 8:55 AM, Omer El Idrissi wrote: > Move static function from header file to only c file it's used in. why? all the drv_ inlines are in driver-ops.h first rule of commit text is to describe the problem you are tying to solve. don't add unnecessary churn to the wireless code. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] mac80211: move static function from header to referenced file 2026-10-30 1:31 ` Jeff Johnson @ 2026-10-30 13:21 ` Omer El Idrissi 0 siblings, 0 replies; 6+ messages in thread From: Omer El Idrissi @ 2026-10-30 13:21 UTC (permalink / raw) To: Jeff Johnson, johannes; +Cc: linux-wireless, linux-kernel >> Move static function from header file to only c file it's used in. > why? all the drv_ inlines are in driver-ops.h > > first rule of commit text is to describe the problem you are tying to solve. > > don't add unnecessary churn to the wireless code. i moved it because multiple files include the header and when those are compiled they don't see the tracepoint definition because the next patch ifdef guards it under the same config that enables the only file the static function that uses the tracepoint is called from. this static function was only used in that file and i didn't see any obvious reason for it's existance in that header so i moved it to the file where it's used. commit messages are kept in the git history. should i send a v2 with a better commit message? or is the patch series problematic otherwise? ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] mac80211: hide drv_get_stats tracepoint with ifdef guard 2026-10-17 15:55 [PATCH 0/2] mac80211: hide tracepoint definition Omer El Idrissi 2026-10-17 15:55 ` [PATCH 1/2] mac80211: move static function from header to referenced file Omer El Idrissi @ 2026-10-17 15:55 ` Omer El Idrissi 2026-10-24 14:31 ` [PATCH 0/2] mac80211: hide tracepoint definition Omer El Idrissi 2 siblings, 0 replies; 6+ messages in thread From: Omer El Idrissi @ 2026-10-17 15:55 UTC (permalink / raw) To: johannes; +Cc: linux-wireless, linux-kernel, Omer El Idrissi Hide drv_get_stats tracepoint definition with CONFIG_MAC80211_DEBUGFS which is the same config that enables net/mac80211/debugfs.c, where the tracepoint is used in order to remove unused tracepoint warning from UT=1. Signed-off-by: Omer El Idrissi <omer.e.idrissi@gmail.com> --- net/mac80211/trace.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h index 562a4964afa3..6d80d23b7c4b 100644 --- a/net/mac80211/trace.h +++ b/net/mac80211/trace.h @@ -756,6 +756,8 @@ DEFINE_EVENT(local_sdata_evt, drv_sw_scan_complete, TP_ARGS(local, sdata) ); +#ifdef CONFIG_MAC80211_DEBUGFS + TRACE_EVENT(drv_get_stats, TP_PROTO(struct ieee80211_local *local, struct ieee80211_low_level_stats *stats, @@ -787,6 +789,8 @@ TRACE_EVENT(drv_get_stats, ) ); +#endif /* CONFIG_MAC80211_DEBUGFS */ + TRACE_EVENT(drv_get_key_seq, TP_PROTO(struct ieee80211_local *local, struct ieee80211_key_conf *key), -- 2.53.0 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] mac80211: hide tracepoint definition 2026-10-17 15:55 [PATCH 0/2] mac80211: hide tracepoint definition Omer El Idrissi 2026-10-17 15:55 ` [PATCH 1/2] mac80211: move static function from header to referenced file Omer El Idrissi 2026-10-17 15:55 ` [PATCH 2/2] mac80211: hide drv_get_stats tracepoint with ifdef guard Omer El Idrissi @ 2026-10-24 14:31 ` Omer El Idrissi 2 siblings, 0 replies; 6+ messages in thread From: Omer El Idrissi @ 2026-10-24 14:31 UTC (permalink / raw) To: johannes; +Cc: linux-wireless, linux-kernel ping ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-10-30 13:21 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2026-10-17 15:55 [PATCH 0/2] mac80211: hide tracepoint definition Omer El Idrissi 2026-10-17 15:55 ` [PATCH 1/2] mac80211: move static function from header to referenced file Omer El Idrissi 2026-10-30 1:31 ` Jeff Johnson 2026-10-30 13:21 ` Omer El Idrissi 2026-10-17 15:55 ` [PATCH 2/2] mac80211: hide drv_get_stats tracepoint with ifdef guard Omer El Idrissi 2026-10-24 14:31 ` [PATCH 0/2] mac80211: hide tracepoint definition Omer El Idrissi
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®