Skip to contentSkip to conversation

cfg80211: regulatory: Fix inconsistent of format with argument type in reg.c

PATCH New Ye Bin 1 participant 1 message Oct 9, 2020 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore

Ye Bin

author
#0 lore raw

PATCH 1/1 cfg80211: regulatory: Fix inconsistent of format with argument type in reg.c

Fix follow warning:
[net/wireless/reg.c:3619]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.

---
 net/wireless/reg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/wireless/reg.c +1 -1
index 3dab859641e1..a04fdfb35f07 100644
@@ -3616,7 +3616,7 @@ static void print_rd_rules(const struct ieee80211_regdomain *rd)
 		power_rule = &reg_rule->power_rule;
 
 		if (reg_rule->flags & NL80211_RRF_AUTO_BW)
-			snprintf(bw, sizeof(bw), "%d KHz, %d KHz AUTO",
+			snprintf(bw, sizeof(bw), "%d KHz, %u KHz AUTO",
 				 freq_range->max_bandwidth_khz,
 				 reg_get_max_bandwidth(rd, reg_rule));
 		else
Signature · 1 line
2.16.2.dirty