iwlwifi: pcie: use LIST_HEAD() macro
authorJohannes Berg <johannes.berg@intel.com>
Wed, 31 Aug 2016 20:16:11 +0000 (22:16 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Mon, 19 Sep 2016 08:29:35 +0000 (11:29 +0300)
There's no need to declare a list and then init it manually,
just use the LIST_HEAD() macro.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/rx.c

index 78cb6d2314d98cc34970696d06efa639c90de437..6fe5546dc7730f2f305321eb866379cf80478515 100644 (file)
@@ -487,15 +487,13 @@ static void iwl_pcie_rx_allocator(struct iwl_trans *trans)
 
        while (pending) {
                int i;
-               struct list_head local_allocated;
+               LIST_HEAD(local_allocated);
                gfp_t gfp_mask = GFP_KERNEL;
 
                /* Do not post a warning if there are only a few requests */
                if (pending < RX_PENDING_WATERMARK)
                        gfp_mask |= __GFP_NOWARN;
 
-               INIT_LIST_HEAD(&local_allocated);
-
                for (i = 0; i < RX_CLAIM_REQ_ALLOC;) {
                        struct iwl_rx_mem_buffer *rxb;
                        struct page *page;