Skip to contentSkip to conversation

net: Change niu_rbr_fill() to use unlikely() to check niu_rbr_add_page() return value

PATCH Applied Shuah Khan 2 participants 2 messages Jul 20, 2012 – Jul 23, 2012

Subsystems (2)
lore
Share & tools
lore

Shuah Khan

author
#0 lore raw

PATCH 1/1 net: Change niu_rbr_fill() to use unlikely() to check niu_rbr_add_page() return value

Change niu_rbr_fill() to use unlikely() to check niu_rbr_add_page() return value to be consistent with the rest of the checks after niu_rbr_add_page() calls in this file.

---
 drivers/net/ethernet/sun/niu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/sun/niu.c +1 -1
index 60d5c03..c2a0fe3 100644
@@ -3517,7 +3517,7 @@ static int niu_rbr_fill(struct niu *np, struct rx_ring_info *rp, gfp_t mask)
 	err = 0;
 	while (index < (rp->rbr_table_size - blocks_per_page)) {
 		err = niu_rbr_add_page(np, rp, mask, index);
-		if (err)
+		if (unlikely(err))
 			break;
 
 		index += blocks_per_page;
Signature · 1 line
1.7.9.5
maintainer Applied
#1 lore raw

From: Shuah Khan <[email protected]>
Date: Fri, 20 Jul 2012 17:34:32 -0600

Quoted 5 lines

Change niu_rbr_fill() to use unlikely() to check niu_rbr_add_page() return value to be consistent with the rest of the checks after niu_rbr_add_page() calls in this file.

Applied.