diff mbox series

[v2] wifi: mac80211: tx: Add __must_hold() annotation

Message ID 20240113172719.40364-3-bpappas@pappasbrent.com (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series [v2] wifi: mac80211: tx: Add __must_hold() annotation | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1092 this patch: 1092
netdev/cc_maintainers success CCed 0 of 0 maintainers
netdev/build_clang success Errors and warnings before: 1107 this patch: 1107
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1107 this patch: 1107
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 14 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest pending net-next-2024-01-14--15-00

Commit Message

Brent Pappas Jan. 13, 2024, 5:27 p.m. UTC
Annotates ieee80211_set_beacon_cntdwn() with a __must_hold() annotation to
make it clear that ieee80211_set_beacon_cntdwn() is only intended to be
called when the caller has a lock on the argument "link."

Signed-off-by: Brent Pappas <bpappas@pappasbrent.com>
---
Changelog:
v1 -> v2: Include linux/compiler_types.h with angle brackets instead of
          quotes.

 net/mac80211/tx.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 314998fdb1a5..ca7adace6a9c 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -10,6 +10,7 @@ 
  * Transmit and frame generation functions.
  */
 
+#include <linux/compiler_types.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/skbuff.h>
@@ -4974,6 +4975,7 @@  static int ieee80211_beacon_add_tim(struct ieee80211_sub_if_data *sdata,
 static void ieee80211_set_beacon_cntdwn(struct ieee80211_sub_if_data *sdata,
 					struct beacon_data *beacon,
 					struct ieee80211_link_data *link)
+	__must_hold(link)
 {
 	u8 *beacon_data, count, max_count = 1;
 	struct probe_resp *resp;