staging: ks7010: convert list_for_each to entry variant
authorWei Yongjun <weiyongjun1@huawei.com>
Tue, 18 Oct 2016 14:37:47 +0000 (14:37 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Oct 2016 07:59:49 +0000 (09:59 +0200)
convert list_for_each() to list_for_each_entry() where
applicable.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_hostif.c

index cbf49c9..1fbd495 100644 (file)
@@ -2402,13 +2402,11 @@ void hostif_sme_set_pmksa(struct ks_wlan_private *priv)
                } __packed list[PMK_LIST_MAX];
        } __packed pmkcache;
        struct pmk_t *pmk;
-       struct list_head *ptr;
        int i;
 
        DPRINTK(4, "pmklist.size=%d\n", priv->pmklist.size);
        i = 0;
-       list_for_each(ptr, &priv->pmklist.head) {
-               pmk = list_entry(ptr, struct pmk_t, list);
+       list_for_each_entry(pmk, &priv->pmklist.head, list) {
                if (i < PMK_LIST_MAX) {
                        memcpy(pmkcache.list[i].bssid, pmk->bssid, ETH_ALEN);
                        memcpy(pmkcache.list[i].pmkid, pmk->pmkid,