linux-stable/include
Arnd Bergmann b39aeb338a rdma: fix INFINIBAND_USER_ACCESS dependency
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: 360da60d6c ("RDMA/bnxt_re: Enable low latency push")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2023-07-03 16:55:04 -07:00
..
acpi hardening updates for v6.5-rc1 2023-06-27 21:24:18 -07:00
asm-generic Kbuild updates for v6.5 2023-07-01 09:24:31 -07:00
clocksource
crypto This update includes the following changes: 2023-06-30 21:27:13 -07:00
drm
dt-bindings Char/Misc and other driver subsystem updates for 6.5-rc1 2023-07-03 12:46:47 -07:00
keys KEYS: Add forward declaration in asymmetric-parser.h 2023-06-23 16:15:37 +08:00
kunit
kvm Common KVM changes for 6.5: 2023-07-01 07:07:55 -04:00
linux virtio: features, fixes, cleanups 2023-07-03 15:38:26 -07:00
math-emu
media
memory
misc
net v6.5 merge window RDMA pull request 2023-06-29 21:01:17 -07:00
pcmcia
ras
rdma rdma: fix INFINIBAND_USER_ACCESS dependency 2023-07-03 16:55:04 -07:00
rv
scsi SCSI misc on 20230629 2023-06-30 11:57:07 -07:00
soc ARM: SoC drivers for 6.5 2023-06-29 15:22:19 -07:00
sound ASoC: Updates for v6.5 2023-06-26 15:38:02 +02:00
target SCSI misc on 20230629 2023-06-30 11:57:07 -07:00
trace NFS client updates for Linux 6.5 2023-07-01 14:38:25 -07:00
uapi virtio: features, fixes, cleanups 2023-07-03 15:38:26 -07:00
ufs SCSI misc on 20230629 2023-06-30 11:57:07 -07:00
vdso
video sticon/parisc: Fix STI console on 64-bit only machines 2023-06-30 17:14:14 +02:00
xen x86: xen: add missing prototypes 2023-06-26 07:47:11 +02:00