1
0
Fork 0
remarkable-linux/drivers/net/wireless/broadcom/brcm80211/brcmsmac
Stefan Agner dad01c5698 brcmsmac: fix wrap around in conversion from constant to s16
[ Upstream commit c9a61469fc ]

The last value in the log_table wraps around to a negative value
since s16 has a value range of -32768 to 32767. This is not what
the table intends to represent. Use the closest positive value
32767.

This fixes a warning seen with clang:
drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_qmath.c:216:2: warning:
      implicit conversion from 'int' to 's16' (aka 'short') changes
value from 32768
      to -32768 [-Wconstant-conversion]
        32768
        ^~~~~
1 warning generated.

Fixes: 4c0bfeaae9 ("brcmsmac: fix array out-of-bounds access in qm_log10")
Cc: Tobias Regnery <tobias.regnery@gmail.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-03 17:00:52 -07:00
..
phy
Makefile
aiutils.c
aiutils.h
ampdu.c
ampdu.h
antsel.c
antsel.h
brcms_trace_brcmsmac.h
brcms_trace_brcmsmac_msg.h
brcms_trace_brcmsmac_tx.h
brcms_trace_events.c
brcms_trace_events.h
channel.c
channel.h
d11.h
debug.c
debug.h
dma.c
dma.h
led.c
led.h
mac80211_if.c
mac80211_if.h
main.c
main.h
phy_shim.c
phy_shim.h
pmu.c
pmu.h
pub.h
rate.c
rate.h
scb.h
stf.c
stf.h
types.h
ucode_loader.c
ucode_loader.h