bnxt_en: Fix compile error regression when CONFIG_BNXT_SRIOV is not set
authorMichael Chan <michael.chan@broadcom.com>
Tue, 16 Nov 2021 19:26:10 +0000 (14:26 -0500)
committerJakub Kicinski <kuba@kernel.org>
Wed, 17 Nov 2021 02:58:14 +0000 (18:58 -0800)
commit9f5363916a5099e618e6e40606e91b8ce0833754
treef65148cfc44314bfc634214ce14e74d017e52784
parent2460386bef0b9b98b71728d3c173e15558b78d82
bnxt_en: Fix compile error regression when CONFIG_BNXT_SRIOV is not set

bp->sriov_cfg is not defined when CONFIG_BNXT_SRIOV is not set.  Fix
it by adding a helper function bnxt_sriov_cfg() to handle the logic
with or without the config option.

Fixes: 46d08f55d24e ("bnxt_en: extend RTNL to VF check in devlink driver_reinit")
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
Reviewed-by: Andy Gospodarek <gospo@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://lore.kernel.org/r/1637090770-22835-1-git-send-email-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.h
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c