linux/drivers/net/wireless
Justin Stitt 68204a6965 wifi: mt7601u: fix clang -Wformat warning
When building with Clang we encounter this warning:
| drivers/net/wireless/mediatek/mt7601u/debugfs.c:92:6: error: format
| specifies type 'unsigned char' but the argument has type 'int'
| [-Werror,-Wformat] dev->ee->reg.start + dev->ee->reg.num - 1);

The format specifier used is `%hhu` which describes a u8. Both
`dev->ee->reg.start` and `.num` are u8 as well. However, the expression
as a whole is promoted to an int as you cannot get smaller-than-int from
addition. Therefore, to fix the warning, use the promoted-to-type's
format specifier -- in this case `%d`.

example:
```
uint8_t a = 4, b = 7;
int size = sizeof(a + b - 1);
printf("%d\n", size);
// output: 4
```

See more:
(https://wiki.sei.cmu.edu/confluence/display/c/INT02-C.+Understand+integer+conversion+rules)
"Integer types smaller than int are promoted when an operation is
performed on them. If all values of the original type can be represented
as an int, the value of the smaller type is converted to an int;
otherwise, it is converted to an unsigned int."

Signed-off-by: Justin Stitt <justinstitt@google.com>
Acked-by: Jakub Kicinski <kubakici@wp.pl>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220711212932.1501592-1-justinstitt@google.com
2022-07-18 14:54:23 +03:00
..
admtek wifi: mac80211: split bss_info_changed method 2022-06-20 12:55:09 +02:00
ath wifi: mac80211: replace link_id with link_conf in switch/(un)assign_vif_chanctx() 2022-07-15 11:43:20 +02:00
atmel wifi: mac80211: split bss_info_changed method 2022-06-20 12:55:09 +02:00
broadcom wifi: mac80211: change QoS settings API to take link into account 2022-07-15 11:43:15 +02:00
cisco airo: fix typos in comments 2022-03-16 17:30:40 +02:00
intel wifi: mac80211: replace link_id with link_conf in switch/(un)assign_vif_chanctx() 2022-07-15 11:43:20 +02:00
intersil wifi: p54: Use the bitmap API to allocate bitmaps 2022-07-18 14:51:54 +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: cfg80211: Increase akm_suites array size in cfg80211_crypto_settings 2022-07-01 12:07:08 +02:00
ralink wifi: mac80211: change QoS settings API to take link into account 2022-07-15 11:43:15 +02:00
realtek wifi: mac80211: replace link_id with link_conf in start/stop_ap() 2022-07-15 11:43:17 +02:00
rsi wifi: mac80211: change QoS settings API to take link into account 2022-07-15 11:43:15 +02: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: mac80211: replace link_id with link_conf in switch/(un)assign_vif_chanctx() 2022-07-15 11:43:20 +02: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: fix TX link selection 2022-07-15 11:43:24 +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