linux/drivers/net/wireless
Justin Stitt 7819b3d1da wifi: iwlwifi: mvm: fix clang -Wformat warnings
When building with Clang we encounter these warnings:
| drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c:1108:47: error:
| format specifies type 'unsigned char' but the argument has type 's16'
| (aka 'short') [-Werror,-Wformat] IWL_DEBUG_INFO(mvm, "\tburst index:
| %hhu\n", res->ftm.burst_index);
-
| drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c:1111:47: error:
| format specifies type 'unsigned char' but the argument has type 's32'
| (aka 'int') [-Werror,-Wformat] IWL_DEBUG_INFO(mvm, "\trssi spread:
| %hhu\n", res->ftm.rssi_spread);

The previous format specifier `%hhu` describes a u8 but our arguments
are wider than this which means bits are potentially being lost.

Variadic functions (printf-like) undergo default argument promotion.
Documentation/core-api/printk-formats.rst specifically recommends using
the promoted-to-type's format flag.

As per C11 6.3.1.1:
(https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1548.pdf) `If an int
can represent all values of the original type ..., the value is
converted to an int; otherwise, it is converted to an unsigned int.
These are called the integer promotions.` Thus it makes sense to change
`%hhu` to `%d` for both instances of the warning.

Link: https://github.com/ClangBuiltLinux/linux/issues/378
Signed-off-by: Justin Stitt <justinstitt@google.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220711222919.2043613-1-justinstitt@google.com
2022-07-27 13:47:56 +03:00
..
admtek wifi: mac80211: split bss_info_changed method 2022-06-20 12:55:09 +02:00
ath wifi: wcn36xx: fix repeated words in comments 2022-07-18 13:05:42 +03:00
atmel wifi: atmel: fix repeated words in comments 2022-07-18 15:06:59 +03:00
broadcom wifi: brcmsmac: fix repeated words in comments 2022-07-18 15:07:57 +03:00
cisco airo: fix typos in comments 2022-03-16 17:30:40 +02:00
intel wifi: iwlwifi: mvm: fix clang -Wformat warnings 2022-07-27 13:47:56 +03:00
intersil wifi: p54: add missing parentheses in p54_flush() 2022-07-18 14:54:50 +03:00
marvell wifi: mac80211: change QoS settings API to take link into account 2022-07-15 11:43:15 +02:00
mediatek wifi: mt7601u: fix clang -Wformat warning 2022-07-18 14:54:23 +03:00
microchip wifi: cfg80211/mac80211: separate link params from station params 2022-07-15 11:43:13 +02:00
purelifi wifi: mac80211: return a beacon for a specific link 2022-06-20 12:57:08 +02:00
quantenna wifi: qtnfmac: fix repeated words in comments 2022-07-18 15:09:03 +03:00
ralink wifi: rt2x00: fix repeated words in comments 2022-07-18 15:10:52 +03:00
realtek wifi: rtl8192se: fix repeated words in comments 2022-07-18 15:11:29 +03:00
rsi wifi: rsi: fix repeated words in comments 2022-07-18 15:11:53 +03:00
silabs wifi: mac80211: replace link_id with link_conf in switch/(un)assign_vif_chanctx() 2022-07-15 11:43:20 +02:00
st wifi: mac80211: change QoS settings API to take link into account 2022-07-15 11:43:15 +02:00
ti wifi: wl1251: fix repeated words in comments 2022-07-18 15:12:08 +03:00
zydas wifi: mac80211: return a beacon for a specific link 2022-06-20 12:57:08 +02:00
Kconfig wireless: add plfxlc driver for pureLiFi X, XL, XC devices 2022-04-25 15:30:42 +03:00
mac80211_hwsim.c wifi: mac80211_hwsim: handle links for wmediumd/virtio 2022-07-22 14:28:20 +02:00
mac80211_hwsim.h wifi: mac80211_hwsim: support creating MLO-capable radios 2022-06-20 12:57:09 +02:00
Makefile wireless: Fix Makefile to be in alphabetical order 2022-05-17 18:29:49 +03:00
ray_cs.c wifi: ray_cs: Drop useless status variable in parse_addr() 2022-06-08 11:08:34 +03:00
ray_cs.h
rayctl.h
rndis_wlan.c cfg80211: Indicate MLO connection info in connect and roam callbacks 2022-06-20 12:57:09 +02:00
virt_wifi.c wifi: virt_wifi: fix typo in comment 2022-06-10 15:35:49 +02:00
wl3501_cs.c wl3501_cs: use eth_hw_addr_set() 2021-10-20 12:39:47 +03:00
wl3501.h