Re: [PATCH] RDMA/hns: Fix build error again

From: Jason Gunthorpe
Date: Tue Oct 29 2019 - 15:18:06 EST


On Mon, Oct 07, 2019 at 11:18:08PM +0200, Arnd Bergmann wrote:
> This is not the first attempt to fix building random configurations,
> unfortunately the attempt in commit a07fc0bb483e ("RDMA/hns: Fix build
> error") caused a new problem when CONFIG_INFINIBAND_HNS_HIP06=m
> and CONFIG_INFINIBAND_HNS_HIP08=y:
>
> drivers/infiniband/hw/hns/hns_roce_main.o:(.rodata+0xe60): undefined reference to `__this_module'
>
> Revert commits a07fc0bb483e ("RDMA/hns: Fix build error") and
> a3e2d4c7e766 ("RDMA/hns: remove obsolete Kconfig comment") to get
> back to the previous state, then fix the issues described there
> differently, by adding more specific dependencies: INFINIBAND_HNS
> can now only be built-in if at least one of HNS or HNS3 are
> built-in, and the individual back-ends are only available if
> that code is reachable from the main driver.
>
> Fixes: a07fc0bb483e ("RDMA/hns: Fix build error")
> Fixes: a3e2d4c7e766 ("RDMA/hns: remove obsolete Kconfig comment")
> Fixes: dd74282df573 ("RDMA/hns: Initialize the PCI device for hip08 RoCE")
> Fixes: 08805fdbeb2d ("RDMA/hns: Split hw v1 driver from hns roce driver")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---
> drivers/infiniband/hw/hns/Kconfig | 17 ++++++++++++++---
> drivers/infiniband/hw/hns/Makefile | 8 ++++++--
> 2 files changed, 20 insertions(+), 5 deletions(-)

Applied to for-next, let us give it some time in linux-next I guess?

Thanks,
Jason