• Lee Jones's avatar
    hostap: Mark 'freq_list' as __maybe_unused · 34537d49
    Lee Jones authored
    'freq_list' is used in some source files which include hostap.h, but
    not all.  The compiler complains about the times it's not used.  Mark
    it as __maybe_used to tell the compiler that this is not only okay,
    it's expected.
    
    Fixes the following W=1 kernel build warning(s):
    
     In file included from drivers/net/wireless/intersil/hostap/hostap_80211_tx.c:9:
     drivers/net/wireless/intersil/hostap/hostap.h:11:19: warning: ‘freq_list’ defined but not used [-Wunused-const-variable=]
     In file included from drivers/net/wireless/intersil/hostap/hostap_main.c:31:
     drivers/net/wireless/intersil/hostap/hostap.h:11:19: warning: ‘freq_list’ defined but not used [-Wunused-const-variable=]
     In file included from drivers/net/wireless/intersil/hostap/hostap_proc.c:10:
     drivers/net/wireless/intersil/hostap/hostap.h:11:19: warning: ‘freq_list’ defined but not used [-Wunused-const-variable=]
     In file included from drivers/net/wireless/intersil/hostap/hostap_hw.c:50,
     from drivers/net/wireless/intersil/hostap/hostap_cs.c:196:
     At top level:
     drivers/net/wireless/intersil/hostap/hostap.h:11:19: warning: ‘freq_list’ defined but not used [-Wunused-const-variable=]
     In file included from drivers/net/wireless/intersil/hostap/hostap_hw.c:50,
     from drivers/net/wireless/intersil/hostap/hostap_pci.c:221:
     At top level:
     drivers/net/wireless/intersil/hostap/hostap.h:11:19: warning: ‘freq_list’ defined but not used [-Wunused-const-variable=]
     In file included from drivers/net/wireless/intersil/hostap/hostap_hw.c:50,
     from drivers/net/wireless/intersil/hostap/hostap_plx.c:264:
     At top level:
     drivers/net/wireless/intersil/hostap/hostap.h:11:19: warning: ‘freq_list’ defined but not used [-Wunused-const-variable=]
    
    Cc: Jouni Malinen <j@w1.fi>
    Cc: Kalle Valo <kvalo@codeaurora.org>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Jakub Kicinski <kuba@kernel.org>
    Cc: linux-wireless@vger.kernel.org
    Cc: netdev@vger.kernel.org
    Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
    Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
    Link: https://lore.kernel.org/r/20200819072402.3085022-2-lee.jones@linaro.org
    34537d49
hostap.h 3.5 KB