]> www.infradead.org Git - users/jedix/linux-maple.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)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 7 Jul 2016 00:36:38 +0000 (17:36 -0700)
commitad0dc865c397b12d9dd856b2074d32766adfec8d
tree9ce5e5458349b7c825bef3dc7920450af9ed7e18
parent5fa8dd42a8e4c9e78807f4f07c77c14247dd8255
bnxt_en: Optimize ring alloc and ring free functions.

Orabug: 23221795

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>
(cherry picked from commit edd0c2cc2b73ff21f356d6cbd3b5bf83e692ea9d)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c