linux/drivers/staging/gpib
Steven Rostedt e84a3bf7f4 staging: gpib: Fix allyesconfig build failures
My tests run an allyesconfig build and it failed with the following errors:

    LD [M]  samples/kfifo/dma-example.ko
  ld.lld: error: undefined symbol: nec7210_board_reset
  ld.lld: error: undefined symbol: nec7210_read
  ld.lld: error: undefined symbol: nec7210_write

It appears that some modules call the function nec7210_board_reset()
that is defined in nec7210.c.  In an allyesconfig build, these other
modules are built in.  But the file that holds nec7210_board_reset()
has:

  obj-m += nec7210.o

Where that "-m" means it only gets built as a module. With the other
modules built in, they have no access to nec7210_board_reset() and the build
fails.

This isn't the only function. After fixing that one, I hit another:

  ld.lld: error: undefined symbol: push_gpib_event
  ld.lld: error: undefined symbol: gpib_match_device_path

Where push_gpib_event() was also used outside of the file it was defined
in, and that file too only was built as a module.

Since the directory that nec7210.c is only traversed when
CONFIG_GPIB_NEC7210 is set, and the directory with gpib_common.c is only
traversed when CONFIG_GPIB_COMMON is set, use those configs as the
option to build those modules.  When it is an allyesconfig, then they
will both be built in and their functions will be available to the other
modules that are also built in.

Fixes: 3ba84ac69b ("staging: gpib: Add nec7210 GPIB chip driver")
Fixes: 9dde4559e9 ("staging: gpib: Add GPIB common core driver")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
History 2024-12-21 11:30:13 -08:00
..
agilent_82350b staging: gpib: Use dev_xxx for messaging 2024-11-07 09:27:34 +01:00
agilent_82357a staging: gpib: avoid unintended sign extension 2024-11-10 08:04:10 +01:00
cb7210 staging: gpib: Replace custom debug with dev_dbg 2024-11-07 09:27:34 +01:00
cec staging: gpib: add module descriptions 2024-10-19 09:57:03 +02:00
common staging: gpib: Fix allyesconfig build failures 2024-12-21 11:30:13 -08:00
eastwood staging: gpib: Replace custom debug with dev_dbg 2024-11-07 09:27:34 +01:00
fmh_gpib staging: gpib: Replace custom debug with dev_dbg 2024-11-07 09:27:34 +01:00
gpio staging: gpib: Re-order the lookup tables 2024-11-07 09:27:35 +01:00
hp_82335 staging: gpib: add module descriptions 2024-10-19 09:57:03 +02:00
hp_82341 staging: gpib: Replace kmalloc/memset with kzalloc. 2024-10-17 16:08:38 +02:00
include staging: gpib: Replace custom debug with dev_dbg 2024-11-07 09:27:34 +01:00
ines staging: gpib: Replace custom debug with dev_dbg 2024-11-07 09:27:34 +01:00
lpvo_usb_gpib staging: gpib: Fix faulty workaround for assignment in if 2024-12-04 16:58:33 +01:00
nec7210 staging: gpib: Fix allyesconfig build failures 2024-12-21 11:30:13 -08:00
ni_usb staging: gpib: Update messaging and usb_device refs in ni_usb 2024-11-07 09:27:34 +01:00
pc2 staging: gpib: pc2: avoid calling undefined dma_free() 2024-10-19 09:57:03 +02:00
tms9914 staging: gpib: Replace custom debug with dev_dbg 2024-11-07 09:27:34 +01:00
tnt4882 staging: gpib: Replace custom debug with dev_dbg 2024-11-07 09:27:34 +01:00
uapi staging: gpib: avoid unused const variables 2024-10-19 09:57:03 +02:00
Kconfig staging: gpib: Fix i386 build issue 2024-12-04 17:29:20 +01:00
Makefile staging: gpib: Replace custom debug with dev_dbg 2024-11-07 09:27:34 +01:00
TODO staging: gpib: Add TODO file 2024-11-04 00:50:53 +01:00