niu: remove one compound_head() call
authorEric Dumazet <edumazet@google.com>
Fri, 16 Jan 2015 13:39:30 +0000 (05:39 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 18 Jan 2015 04:58:37 +0000 (23:58 -0500)
After a "page = alloc_page(mask);", we do not need to use
compound_head() : page already points to the right place.

This would be true even if using alloc_pages().

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sun/niu.c

index 0c64162138377e31cd8a8a7b09adb42a1124cd39..4b51f903fb733cba9b9b8a3fe9539fe3bc811c84 100644 (file)
@@ -3341,8 +3341,7 @@ static int niu_rbr_add_page(struct niu *np, struct rx_ring_info *rp,
 
        niu_hash_page(rp, page, addr);
        if (rp->rbr_blocks_per_page > 1)
-               atomic_add(rp->rbr_blocks_per_page - 1,
-                          &compound_head(page)->_count);
+               atomic_add(rp->rbr_blocks_per_page - 1, &page->_count);
 
        for (i = 0; i < rp->rbr_blocks_per_page; i++) {
                __le32 *rbr = &rp->rbr[start_index + i];