mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
b39aeb338a
After a change to the bnxt_re driver, it fails to link when
CONFIG_INFINIBAND_USER_ACCESS is disabled:
aarch64-linux-ld: drivers/infiniband/hw/bnxt_re/ib_verbs.o: in function `bnxt_re_handler_BNXT_RE_METHOD_ALLOC_PAGE':
ib_verbs.c:(.text+0xd64): undefined reference to `ib_uverbs_get_ucontext_file'
aarch64-linux-ld: drivers/infiniband/hw/bnxt_re/ib_verbs.o:(.rodata+0x168): undefined reference to `uverbs_idr_class'
aarch64-linux-ld: drivers/infiniband/hw/bnxt_re/ib_verbs.o:(.rodata+0x1a8): undefined reference to `uverbs_destroy_def_handler'
The problem is that the 'bnxt_re_uapi_defs' structure is built
unconditionally and references a couple of functions that are never
really called in this configuration but instead require other functions
that are left out.
Adding an #ifdef around the new code, or a Kconfig dependency would
address this problem, but adding the compile-time check inside of the
UAPI_DEF_CHAIN_OBJ_TREE_NAMED() macro seems best because that also
addresses the problem in other drivers that may run into the same
dependency.
Fixes:
|
||
---|---|---|
.. | ||
ib_addr.h | ||
ib_cache.h | ||
ib_cm.h | ||
ib_hdrs.h | ||
ib_mad.h | ||
ib_marshall.h | ||
ib_pack.h | ||
ib_pma.h | ||
ib_sa.h | ||
ib_smi.h | ||
ib_sysfs.h | ||
ib_umem_odp.h | ||
ib_umem.h | ||
ib_verbs.h | ||
ib.h | ||
iba.h | ||
ibta_vol1_c12.h | ||
iw_cm.h | ||
iw_portmap.h | ||
lag.h | ||
mr_pool.h | ||
opa_addr.h | ||
opa_port_info.h | ||
opa_smi.h | ||
opa_vnic.h | ||
rdma_cm_ib.h | ||
rdma_cm.h | ||
rdma_counter.h | ||
rdma_netlink.h | ||
rdma_vt.h | ||
rdmavt_cq.h | ||
rdmavt_mr.h | ||
rdmavt_qp.h | ||
restrack.h | ||
rw.h | ||
signature.h | ||
tid_rdma_defs.h | ||
uverbs_ioctl.h | ||
uverbs_named_ioctl.h | ||
uverbs_std_types.h | ||
uverbs_types.h |