]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-pf: fix build error when CONFIG_OCTEONTX2_PF=y
authorYang Yingliang <yangyingliang@huawei.com>
Sat, 5 Nov 2022 06:34:42 +0000 (14:34 +0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 8 Nov 2022 01:56:41 +0000 (17:56 -0800)
commit53f272b45f1c9d09e26ba6cf41f00dcb6a754e66
tree3855f397ee70010cb8201fa9d2a2d42ea655d929
parent3e7c5aeb697835962ed274c26db3c3f645bf4fe3
octeontx2-pf: fix build error when CONFIG_OCTEONTX2_PF=y

If CONFIG_MACSEC=m and CONFIG_OCTEONTX2_PF=y, it leads a build error:

  ld: drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.o: in function `otx2_pfaf_mbox_up_handler':
  otx2_pf.c:(.text+0x181c): undefined reference to `cn10k_handle_mcs_event'
  ld: drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.o: in function `otx2_probe':
  otx2_pf.c:(.text+0x437e): undefined reference to `cn10k_mcs_init'
  ld: drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.o: in function `otx2_remove':
  otx2_pf.c:(.text+0x5031): undefined reference to `cn10k_mcs_free'
  ld: drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.o: in function `otx2_mbox_up_handler_mcs_intr_notify':
  otx2_pf.c:(.text+0x5f11): undefined reference to `cn10k_handle_mcs_event'

Make CONFIG_OCTEONTX2_PF depends on CONFIG_MACSEC to fix it. Because
it has empty stub functions of cn10k, CONFIG_OCTEONTX2_PF can be enabled
if CONFIG_MACSEC is disabled

Fixes: 24fdd69c4648 ("octeontx2-pf: mcs: Introduce MACSEC hardware offloading")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221105063442.2013981-1-yangyingliang@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/octeontx2/Kconfig