]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Optimize ring alloc and ring free functions.
authorMichael Chan <mchan@broadcom.com>
Sun, 27 Dec 2015 23:19:19 +0000 (18:19 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Dec 2015 05:57:28 +0000 (00:57 -0500)
commit58a547f67eb7ecaa3cfaa497f0a814f882d91e7a
treef53afbd27401a0fe0be979dcc2ec350966b09760
parent4a2a0de560b6cfad3a5c87989385d429dea884d0
bnxt_en: Optimize ring alloc and ring free functions.

Remove the unnecessary "if" statement before the "for" statement:

if (x) {
        for (i = 0; i < x; i++)
...
}

Also, change the ring free function to return void as it only returns 0.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c