From a67a4893f37d5389c812d85ccf1e258b87ef4ead Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Thu, 12 Oct 2017 11:23:04 +0200 Subject: cfg80211: remove set but never used variable cf_offset Perhaps it had been intended to be used, but it clearly isn't. Signed-off-by: Johannes Berg --- net/wireless/chan.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'net/wireless') diff --git a/net/wireless/chan.c b/net/wireless/chan.c index b8aa5a7d5c77..eb824270f6e3 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c @@ -464,7 +464,7 @@ bool cfg80211_is_sub_chan(struct cfg80211_chan_def *chandef, struct ieee80211_channel *chan) { int width; - u32 cf_offset, freq; + u32 freq; if (chandef->chan->center_freq == chan->center_freq) return true; @@ -473,8 +473,6 @@ bool cfg80211_is_sub_chan(struct cfg80211_chan_def *chandef, if (width <= 20) return false; - cf_offset = width / 2 - 10; - for (freq = chandef->center_freq1 - width / 2 + 10; freq <= chandef->center_freq1 + width / 2 - 10; freq += 20) { if (chan->center_freq == freq) -- cgit v1.2.3 From 1188e2a9ef223f5c670301d54a6f65d223a87582 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 13 Oct 2017 14:04:30 +0200 Subject: cfg80211: don't print log output for building shipped-certs Building an allmodconfig kernel with 'make -s' now prints a single line: GEN net/wireless/shipped-certs.c Using '$(kecho)' here will skip the output with 'make -s' but otherwise keeps printing it, which is consistent with how we handle all the other output. Fixes: 90a53e4432b1 ("cfg80211: implement regdb signature checking") Signed-off-by: Arnd Bergmann Signed-off-by: Johannes Berg --- net/wireless/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/wireless') diff --git a/net/wireless/Makefile b/net/wireless/Makefile index 219baea57e4e..e585f3f71f77 100644 --- a/net/wireless/Makefile +++ b/net/wireless/Makefile @@ -23,7 +23,7 @@ cfg80211-y += extra-certs.o endif $(obj)/shipped-certs.c: $(wildcard $(srctree)/$(src)/certs/*.x509) - @echo " GEN $@" + @$(kecho) " GEN $@" @echo '#include "reg.h"' > $@ @echo 'const u8 shipped_regdb_certs[] = {' >> $@ @for f in $^ ; do hexdump -v -e '1/1 "0x%.2x," "\n"' < $$f >> $@ ; done @@ -32,7 +32,7 @@ $(obj)/shipped-certs.c: $(wildcard $(srctree)/$(src)/certs/*.x509) $(obj)/extra-certs.c: $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%) \ $(wildcard $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%)/*.x509) - @echo " GEN $@" + @$(kecho) " GEN $@" @echo '#include "reg.h"' > $@ @echo 'const u8 extra_regdb_certs[] = {' >> $@ @for f in $^ ; do test -f $$f && hexdump -v -e '1/1 "0x%.2x," "\n"' < $$f >> $@ || true ; done -- cgit v1.2.3 From 88230ef1f31bf2d8fcf42c20e5743ff4b3618a29 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 13 Oct 2017 14:04:31 +0200 Subject: cfg80211: fix CFG80211_EXTRA_REGDB_KEYDIR typo The missing CONFIG_ prefix means this macro is never defined, leading to a possible Kbuild warning: net/wireless/reg.c:666:20: error: 'load_keys_from_buffer' defined but not used [-Werror=unused-function] static void __init load_keys_from_buffer(const u8 *p, unsigned int buflen) When we use the correct symbol, the warning also goes away. Fixes: 90a53e4432b1 ("cfg80211: implement regdb signature checking") Signed-off-by: Arnd Bergmann Signed-off-by: Johannes Berg --- net/wireless/reg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/wireless') diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 58319c82ecb3..3871998059de 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -723,7 +723,7 @@ static int __init load_builtin_regdb_keys(void) #ifdef CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS load_keys_from_buffer(shipped_regdb_certs, shipped_regdb_certs_len); #endif -#ifdef CFG80211_EXTRA_REGDB_KEYDIR +#ifdef CONFIG_CFG80211_EXTRA_REGDB_KEYDIR if (CONFIG_CFG80211_EXTRA_REGDB_KEYDIR[0] != '\0') load_keys_from_buffer(extra_regdb_certs, extra_regdb_certs_len); #endif -- cgit v1.2.3