staging: brcm80211: remove for_each_bss() macro from brcmfmac driver
authorArend van Spriel <arend@broadcom.com>
Fri, 16 Sep 2011 19:28:05 +0000 (12:28 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 16 Sep 2011 19:39:42 +0000 (21:39 +0200)
The macro was only used once in the code and has been removed for
clarity reading the code.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h

index 6ac4cc71828655127fb01a08bf6866274ae35b5f..4f3e8b8d589370cc30a82643a31a105cb053201d 100644 (file)
@@ -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;
index 7a8c671cb9beecf974348ab671f83ff5b0fe2fa5..d27d4e6f943134820a570109c15b329af267a3aa 100644 (file)
@@ -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);