diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-05-17 16:46:54 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-05-24 16:45:32 +0300 |
commit | 16d571bb0fe6aa7fed82e19166ca1542026c9c06 (patch) | |
tree | b09ea5478b12d8bed508038cb547ad058aa7eec8 /drivers/parisc/asp.c | |
parent | 6b81745e36e346e8aa936219d0311b384313bee3 (diff) |
rt2x00: convert rt2800_rfcsr_read return type
With CONFIG_KASAN enabled and gcc-7, we get a warning about rather high
stack usage (with a private patch set I have to turn on this warning,
which I intend to get into the next kernel release):
wireless/ralink/rt2x00/rt2800lib.c: In function 'rt2800_bw_filter_calibration':
wireless/ralink/rt2x00/rt2800lib.c:7990:1: error: the frame size of 2144 bytes is larger than 1536 bytes [-Werror=frame-larger-than=]
The problem is that KASAN inserts a redzone around each local variable
that gets passed by reference, and the newly added function has a lot
of them.
This is a semi-automated conversion to change rt2800_rfcsr_read to return
the register contents instead of passing them by value, resulting in
much better object code. The majority of the patch was done using:
sed -i 's:\(rt2800_rfcsr_read(.*, .*\), &\(.*\));:\2 = \1);:' \
-i 's:\(rt2800_rfcsr_read_bank(.*, .*\), &\(.*\));:\2 = \1);:' \
drivers/net/wireless/ralink/rt2x00/rt2800lib.c
Fixes: 41977e86c984 ("rt2x00: add support for MT7620")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/parisc/asp.c')
0 files changed, 0 insertions, 0 deletions