summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sun
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-01-16 05:39:30 -0800
committerDavid S. Miller <davem@davemloft.net>2015-01-17 23:58:37 -0500
commitff8b335610cac5509156f28e03355c895bcc94f5 (patch)
tree01937eec933a217996c434c1d613ca7513e22159 /drivers/net/ethernet/sun
parent66c1a12c65c5bee2427b7813218d1279e4906084 (diff)
downloadop-kernel-dev-ff8b335610cac5509156f28e03355c895bcc94f5.zip
op-kernel-dev-ff8b335610cac5509156f28e03355c895bcc94f5.tar.gz
niu: remove one compound_head() call
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>
Diffstat (limited to 'drivers/net/ethernet/sun')
-rw-r--r--drivers/net/ethernet/sun/niu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
index 0c64162..4b51f90 100644
--- a/drivers/net/ethernet/sun/niu.c
+++ b/drivers/net/ethernet/sun/niu.c
@@ -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];
OpenPOWER on IntegriCloud