[PATCH wireless-next] wifi: cfg80211: fix kernel-doc %field -> @field cross-references
From: Jeff Johnson
Date: Wed Oct 07 2026 - 19:13:18 EST
Struct field cross-references in kernel-doc use @field, not %field (which
is for constants and #defines). Fix eight instances, while also correcting
%elems -> @elem naming in cfg80211_mbssid_elems and cfg80211_rnr_elems.
Assisted-by: LLM
Signed-off-by: Jeff Johnson <jeff.johnson@xxxxxxxxxxxxxxxx>
---
Spotted while doing AI-assisted review of a new feature. At first the AI said
of that new feature:
<LLM>
The series uses %fieldname throughout cfg80211.h to cross-reference other
fields within the same struct. The correct kernel-doc markup for a field
reference is @fieldname. Every example in the existing cfg80211.h file (e.g.
%duration_mandatory, %parent_bssid, %elems, %nan_channels) already uses %, so
this is actually the prevailing convention in this file too — it is
technically wrong per the kernel-doc spec, but consistent with the surrounding
code.
So these are wrong by spec but consistent with the file's existing practice —
not something to flag as a new issue introduced by this series.
</LLM>
But I pushed back with:
you say that "Every example in the existing cfg80211.h file already uses %,
so this is actually the prevailing convention in this file" -- is that
really true for all stuct member references?
And AI had to admit:
<LLM>
That was wrong. The @fieldname pattern dominates overwhelmingly — the grep
showing 226 @gfp, 182 @wiphy, 133 @link_id etc. are all cross-references in
body text. The %fieldname pattern for struct fields exists in only a handful
of pre-existing spots: %scan_start_tsf, %parent_bssid, %parent_tsf,
%nan_channels, %chandefs, %elems (six instances across the whole file, and
%elems is actually wrong — the field is elem not elems).
So the correct conclusion is the opposite of what I said: @fieldname is the
strongly dominant convention for same-struct field cross-references in
cfg80211.h. The new series uses %fieldname throughout, which is inconsistent
with the file's own practice.
All same-struct field cross-references in the new series should use @ not %.
And I retract the earlier claim that the file consistently uses % for fields —
it clearly does not.
</LLM>
For punishment I made the LLM change the code.
And now there will not be any use of % for fields in cfg80211.h.
---
include/net/cfg80211.h | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 05c625d9e076..725dc8053727 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1410,7 +1410,7 @@ struct cfg80211_mbssid_config {
/**
* struct cfg80211_mbssid_elems - Multiple BSSID elements
*
- * @cnt: Number of elements in array %elems.
+ * @cnt: Number of elements in array @elem.
*
* @elem: Array of multiple BSSID element(s) to be added into Beacon frames.
* @elem.data: Data for multiple BSSID elements.
@@ -1427,7 +1427,7 @@ struct cfg80211_mbssid_elems {
/**
* struct cfg80211_rnr_elems - Reduced neighbor report (RNR) elements
*
- * @cnt: Number of elements in array %elems.
+ * @cnt: Number of elements in array @elem.
*
* @elem: Array of RNR element(s) to be added into Beacon frames.
* @elem.data: Data for RNR elements.
@@ -2908,7 +2908,7 @@ struct cfg80211_ssid {
* @scan_start_tsf: scan start time in terms of the TSF of the BSS that the
* wireless device that requested the scan is connected to. If this
* information is not available, this field is left zero.
- * @tsf_bssid: the BSSID according to which %scan_start_tsf is set.
+ * @tsf_bssid: the BSSID according to which @scan_start_tsf is set.
* @aborted: set to true if the scan was aborted for any reason,
* userspace will be notified of that
*/
@@ -3168,8 +3168,8 @@ enum cfg80211_signal_type {
* ktime_get_boottime_ns() is likely appropriate.
* @parent_tsf: the time at the start of reception of the first octet of the
* timestamp field of the frame. The time is the TSF of the BSS specified
- * by %parent_bssid.
- * @parent_bssid: the BSS according to which %parent_tsf is set. This is set to
+ * by @parent_bssid.
+ * @parent_bssid: the BSS according to which @parent_tsf is set. This is set to
* the BSS that requested the scan in which the beacon/probe was received.
* @chains: bitmask for filled values in @chain_signal.
* @chain_signal: per-chain signal strength of last received BSS in dBm.
@@ -4246,9 +4246,9 @@ struct cfg80211_nan_channel {
*
* This struct defines NAN local schedule parameters
*
- * @schedule: a mapping of time slots to chandef indexes in %nan_channels.
+ * @schedule: a mapping of time slots to chandef indexes in @nan_channels.
* An unscheduled slot will be set to %NL80211_NAN_SCHED_NOT_AVAIL_SLOT.
- * @n_channels: number of channel definitions in %nan_channels.
+ * @n_channels: number of channel definitions in @nan_channels.
* @nan_avail_blob: pointer to NAN Availability attribute blob.
* See %NL80211_ATTR_NAN_AVAIL_BLOB for more details.
* @nan_avail_blob_len: length of the @nan_avail_blob in bytes.
@@ -4276,7 +4276,7 @@ struct cfg80211_nan_local_sched {
* This struct defines the set of NAN local schedule channels that must not
* be evacuated for concurrent operations.
*
- * @n_channels: number of channel definitions in %chandefs.
+ * @n_channels: number of channel definitions in @chandefs.
* @chandefs: array of channel definitions that must not be evacuated. Each
* must match a channel of the current local schedule.
*/
---
base-commit: b6f009284138884c4b07bbef7b07d780aa9b5daf
change-id: 20261007-cfg80211-kdoc-28934c035d4c