]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit3879e0c6d1cac4d1ad9611efb00f1d8752172a05
treef65148cfc44314bfc634214ce14e74d017e52784
parentd5d13af2d9ee5f6b0bfa29f052f60da94c952056
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: 4dc29ae6785b ("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