]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: refactor bnxt_alloc_fw_health()
authorEdwin Peer <edwin.peer@broadcom.com>
Sun, 4 Oct 2020 19:22:52 +0000 (15:22 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 4 Oct 2020 21:41:05 +0000 (14:41 -0700)
commit480408d66a6cc773d5a11a170e72650620234efa
tree22f73818bbd1daa605ba7165c4973dd452c48e4e
parent453319841cd82b4daeaf23f317a2d910a270c0e4
bnxt_en: refactor bnxt_alloc_fw_health()

The allocator for the firmware health structure conflates allocation
and capability checks, limiting the reusability of the code. This patch
separates out the capability check and disablement and improves the
warning message to better describe the consequences of an allocation
failure.

Signed-off-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c