From 0569c8e2d6f545b05cbb7a6193ab977a6f9bbc19 Mon Sep 17 00:00:00 2001 From: Arend van Spriel Date: Fri, 16 Sep 2011 12:28:05 -0700 Subject: [PATCH] staging: brcm80211: remove for_each_bss() macro from brcmfmac driver The macro was only used once in the code and has been removed for clarity reading the code. Reported-by: Johannes Berg Reviewed-by: Franky (Zhenhui) Lin Reviewed-by: Roland Vossen Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Franky Lin Signed-off-by: Greg Kroah-Hartman --- drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c | 4 ++-- drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c index 6ac4cc718286..4f3e8b8d5893 100644 --- a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c +++ b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c @@ -1993,8 +1993,8 @@ static s32 brcmf_inform_bss(struct brcmf_cfg80211_priv *cfg_priv) return -EOPNOTSUPP; } WL_SCAN("scanned AP count (%d)\n", bss_list->count); - bi = next_bss(bss_list, bi); - for_each_bss(bss_list, bi, i) { + for (i = 0; i < bss_list->count && i < WL_AP_MAX; i++) { + bi = next_bss(bss_list, bi); err = brcmf_inform_single_bss(cfg_priv, bi); if (unlikely(err)) break; diff --git a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h index 7a8c671cb9be..d27d4e6f9431 100644 --- a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h +++ b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h @@ -362,10 +362,6 @@ static inline struct brcmf_bss_info *next_bss(struct brcmf_scan_results *list, list->bss_info; } -#define for_each_bss(list, bss, __i) \ - for (__i = 0; __i < list->count && __i < WL_AP_MAX; __i++, \ - bss = next_bss(list, bss)) - extern struct brcmf_cfg80211_dev *brcmf_cfg80211_attach(struct net_device *ndev, struct device *busdev, void *data); -- 2.20.1