Skip to contentSkip to conversation

2.4.5-ac4 es1371.o unresolved symbols

DISCUSSION Frank Davis 3 participants 10 messages May 30, 2001 – May 31, 2001

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello,
While 'make modules_install' on 2.4.5-ac4, I received the following error:

depmod: *** Unresolved symbols in /lib/modules/2.4.5-ac4/kernel/drivers/sound/es1371.o
depmod:  gameport_register_port_Rsmp_aa96bd99
depmod:  gameport_unregister_port_Rsmp_ec101047

The previous steps make mrproper, make config, make clean, make bzImage, make modules all appeared to work. The .config is the same as 2.4.5-ac3

Regards,
Frank

#1 lore raw
Quoted 4 lines · Frank Davis

While 'make modules_install' on 2.4.5-ac4, I received the following error:

depmod: *** Unresolved symbols in /lib/modules/2.4.5-ac4/kernel/drivers/sound/es1371.o
depmod:  gameport_register_port_Rsmp_aa96bd99
depmod:  gameport_unregister_port_Rsmp_ec101047

Need more info.
cd 2.4.5-ac4
grep 'gameport_.*register_port' /proc/ksyms System.map sed -ne '/^CONFIG/s/CONFIG_//p' .config

#2 lore raw
In reply to Frank Davis
Quoted 4 lines · Frank Davis

While 'make modules_install' on 2.4.5-ac4, I received the following error:

depmod: *** Unresolved symbols in /lib/modules/2.4.5-ac4/kernel/drivers/sound/es1371.o
depmod:  gameport_register_port_Rsmp_aa96bd99
depmod:  gameport_unregister_port_Rsmp_ec101047

This is messy. gameport.h is included by code outside the joystick directory and it needs to expand differently based on whether gameport.o is compiled or not. Also gameport.o needs to be built in if _any_ consumers are built in (either joystick or sound), it needs to be a module otherwise. Lots of cross config and cross directory dependencies :(.

serio.[ho] has the same problem but I want opinions on this patch before fixing serio.

Index: 5.7/include/linux/gameport.h

include/linux/gameport.h Wed, 30 May 2001 14:36:09 +1000 kaos (linux-2.4/V/32_gameport.h 1.2 644) renamed from include/linux/gameport.h Wed, 30 May 2001 11:45:37 +1000 kaos (linux-2.4/V/32_gameport.h 1.2 644) +14 -5
@@ -31,6 +31,8 @@
 
 #include <asm/io.h>
 
+#if defined(CONFIG_INPUT_GAMEPORT) || defined(CONFIG_INPUT_GAMEPORT_MODULE)
+
 struct gameport;
 
 struct gameport {
@@ -68,13 +70,8 @@ int gameport_open(struct gameport *gamep
 void gameport_close(struct gameport *gameport);
 void gameport_rescan(struct gameport *gameport);
 
-#ifdef CONFIG_JOYSTICK
 void gameport_register_port(struct gameport *gameport);
 void gameport_unregister_port(struct gameport *gameport);
-#else
-void __inline__ gameport_register_port(struct gameport *gameport) { return; }
-void __inline__ gameport_unregister_port(struct gameport *gameport) { return; }
-#endif
 
 void gameport_register_device(struct gameport_dev *dev);
 void gameport_unregister_device(struct gameport_dev *dev);
@@ -135,5 +132,17 @@ static __inline__ void wait_ms(unsigned 
 	current->state = TASK_UNINTERRUPTIBLE;
 	schedule_timeout(1 + ms * HZ / 1000);
 }
+
+#else	/* !(defined(CONFIG_INPUT_GAMEPORT) || defined(CONFIG_INPUT_GAMEPORT_MODULE)) */
+
+struct gameport {
+       int io;
+       int size;
+};
+
+extern inline void gameport_register_port(struct gameport *gameport) { }
+extern inline void gameport_unregister_port(struct gameport *gameport) { }
+
+#endif	/* defined(CONFIG_INPUT_GAMEPORT) || defined(CONFIG_INPUT_GAMEPORT_MODULE) */
 
 #endif

Index: 5.7/drivers/sound/Config.in

drivers/sound/Config.in Wed, 30 May 2001 14:06:32 +1000 kaos (linux-2.4/P/b/0_Config.in 1.4.1.1.1.4 644) renamed from drivers/sound/Config.in Sun, 27 May 2001 10:30:27 +1000 kaos (linux-2.4/P/b/0_Config.in 1.4.1.1.1.4 644) +15 -0
@@ -195,3 +195,18 @@ if [ "$CONFIG_SOUND_OSS" = "y" -o "$CONF
 fi
 
 dep_tristate '  TV card (bt848) mixer support' CONFIG_SOUND_TVMIXER $CONFIG_SOUND $CONFIG_I2C
+
+# If CONFIG_INPUT_GAMEPORT is set then gameport.o will be compiled.  If any of
+# the consumers of gameport.o in this directory are built in then force
+# gameport.o to be built in.  See also drivers/char/joystick/Config.in.  KAO
+
+# Extreme ugliness.  Roll on CML2.
+
+if [ "$CONFIG_INPUT_GAMEPORT" != "n" ]; then
+  if [ "$CONFIG_SOUND_ESSSOLO1" = "y" -o \
+       "$CONFIG_SOUND_ES1370" = "y" -o \
+       "$CONFIG_SOUND_ES1371" = "y" -o \
+       "$CONFIG_SOUND_SONICVIBES" = "y" ]; then
+    define_tristate CONFIG_INPUT_GAMEPORT y
+  fi
+fi

Index: 5.7/drivers/char/joystick/Makefile

drivers/char/joystick/Makefile Wed, 30 May 2001 13:53:00 +1000 kaos (linux-2.4/Y/b/34_Makefile 1.1.1.2 644) renamed from drivers/char/joystick/Makefile Wed, 30 May 2001 11:45:37 +1000 kaos (linux-2.4/Y/b/34_Makefile 1.1.1.2 644) +16 -14
@@ -32,11 +32,11 @@ obj-	:=
 
 obj-$(CONFIG_INPUT_SERPORT)	+= serport.o serio.o
 
-obj-$(CONFIG_INPUT_NS558)	+= ns558.o gameport.o
-obj-$(CONFIG_INPUT_LIGHTNING)	+= lightning.o gameport.o
-obj-$(CONFIG_INPUT_PCIGAME)	+= pcigame.o gameport.o
-obj-$(CONFIG_INPUT_CS461X)	+= cs461x.o gameport.o
-obj-$(CONFIG_INPUT_EMU10K1)	+= emu10k1-gp.o gameport.o
+obj-$(CONFIG_INPUT_NS558)	+= ns558.o
+obj-$(CONFIG_INPUT_LIGHTNING)	+= lightning.o
+obj-$(CONFIG_INPUT_PCIGAME)	+= pcigame.o
+obj-$(CONFIG_INPUT_CS461X)	+= cs461x.o
+obj-$(CONFIG_INPUT_EMU10K1)	+= emu10k1-gp.o
 
 obj-$(CONFIG_INPUT_WARRIOR)	+= warrior.o serio.o
 obj-$(CONFIG_INPUT_MAGELLAN)	+= magellan.o serio.o
@@ -46,21 +46,23 @@ obj-$(CONFIG_INPUT_STINGER)	+= stinger.o
 obj-$(CONFIG_INPUT_IFORCE_232)	+= iforce.o serio.o
 obj-$(CONFIG_INPUT_IFORCE_USB)	+= iforce.o
 
-obj-$(CONFIG_INPUT_ANALOG)	+= analog.o gameport.o
-obj-$(CONFIG_INPUT_A3D)		+= a3d.o gameport.o
-obj-$(CONFIG_INPUT_ADI)		+= adi.o gameport.o
-obj-$(CONFIG_INPUT_COBRA)	+= cobra.o gameport.o
-obj-$(CONFIG_INPUT_GF2K)	+= gf2k.o gameport.o
-obj-$(CONFIG_INPUT_GRIP)	+= grip.o gameport.o
-obj-$(CONFIG_INPUT_INTERACT)	+= interact.o gameport.o
-obj-$(CONFIG_INPUT_TMDC)	+= tmdc.o gameport.o
-obj-$(CONFIG_INPUT_SIDEWINDER)	+= sidewinder.o gameport.o
+obj-$(CONFIG_INPUT_ANALOG)	+= analog.o
+obj-$(CONFIG_INPUT_A3D)		+= a3d.o
+obj-$(CONFIG_INPUT_ADI)		+= adi.o
+obj-$(CONFIG_INPUT_COBRA)	+= cobra.o
+obj-$(CONFIG_INPUT_GF2K)	+= gf2k.o
+obj-$(CONFIG_INPUT_GRIP)	+= grip.o
+obj-$(CONFIG_INPUT_INTERACT)	+= interact.o
+obj-$(CONFIG_INPUT_TMDC)	+= tmdc.o
+obj-$(CONFIG_INPUT_SIDEWINDER)	+= sidewinder.o
 
 obj-$(CONFIG_INPUT_DB9)		+= db9.o
 obj-$(CONFIG_INPUT_GAMECON)	+= gamecon.o
 obj-$(CONFIG_INPUT_TURBOGRAFX)	+= turbografx.o
 
 obj-$(CONFIG_INPUT_AMIJOY)	+= amijoy.o
+
+obj-$(CONFIG_INPUT_GAMEPORT)	+= gameport.o
 
 # The global Rules.make.
 

Index: 5.7/drivers/char/joystick/Config.in

drivers/char/joystick/Config.in Wed, 30 May 2001 14:26:17 +1000 kaos (linux-2.4/Y/b/35_Config.in 1.1.1.2 644) renamed from drivers/char/joystick/Config.in Wed, 30 May 2001 11:45:37 +1000 kaos (linux-2.4/Y/b/35_Config.in 1.1.1.2 644) +45 -0

57 lines not on this page · raw message

#3 lore raw
In reply to Frank Davis
Quoted 14 lines · Keith Owens
Quoted 4 lines · Frank Davis

While 'make modules_install' on 2.4.5-ac4, I received the following error:

depmod: *** Unresolved symbols in /lib/modules/2.4.5-ac4/kernel/drivers/sound/es1371.o
depmod:  gameport_register_port_Rsmp_aa96bd99
depmod:  gameport_unregister_port_Rsmp_ec101047

This is messy. gameport.h is included by code outside the joystick directory and it needs to expand differently based on whether gameport.o is compiled or not. Also gameport.o needs to be built in if _any_ consumers are built in (either joystick or sound), it needs to be a module otherwise. Lots of cross config and cross directory dependencies :(.

Quoted 2 lines

serio.[ho] has the same problem but I want opinions on this patch before fixing serio.

What about this solution? It's a little cleaner.

Signature · 2 lines
Vojtech Pavlik
SuSE Labs
drivers/char/joystick/Config.in +68 -43
diff -urN linux-2.4.5-ac4/drivers/char/joystick/Config.in linux/drivers/char/joystick/Config.in
@@ -5,54 +5,79 @@
 mainmenu_option next_comment
 comment 'Joysticks'
 
-dep_mbool 'Joystick support' CONFIG_JOYSTICK $CONFIG_INPUT
-if [ "$CONFIG_JOYSTICK" != "n" ]; then
-   comment 'Game port support'
-      dep_tristate '  Classic ISA/PnP gameports' CONFIG_INPUT_NS558 $CONFIG_INPUT
-      dep_tristate '  PDPI Lightning 4 gamecard' CONFIG_INPUT_LIGHTNING $CONFIG_INPUT
-      dep_tristate '  Aureal Vortex and Trident 4DWave gameports' CONFIG_INPUT_PCIGAME $CONFIG_INPUT
-      dep_tristate '  Crystal SoundFusion gameports' CONFIG_INPUT_CS461X $CONFIG_INPUT
-      dep_tristate '  SoundBlaster Live! gameports' CONFIG_INPUT_EMU10K1 $CONFIG_INPUT
-      comment '  ESS Solo1, ES1370, ES1371 and SonicVibes gameports are handled by the sound drivers'
-
-   comment 'Gameport joysticks'
-      dep_tristate '  Classic PC analog joysticks and gamepads' CONFIG_INPUT_ANALOG $CONFIG_INPUT
-      dep_tristate '  Assasin 3D and MadCatz Panther devices' CONFIG_INPUT_A3D $CONFIG_INPUT
-      dep_tristate '  Logitech ADI digital joysticks and gamepads' CONFIG_INPUT_ADI $CONFIG_INPUT
-      dep_tristate '  Creative Labs Blaster Cobra gamepad' CONFIG_INPUT_COBRA $CONFIG_INPUT
-      dep_tristate '  Genius Flight2000 Digital joysticks and gamepads' CONFIG_INPUT_GF2K $CONFIG_INPUT
-      dep_tristate '  Gravis GrIP joysticks and gamepads' CONFIG_INPUT_GRIP $CONFIG_INPUT
-      dep_tristate '  InterAct digital joysticks and gamepads' CONFIG_INPUT_INTERACT $CONFIG_INPUT
-      dep_tristate '  ThrustMaster DirectConnect joysticks and gamepads' CONFIG_INPUT_TMDC $CONFIG_INPUT
-      dep_tristate '  Microsoft SideWinder digital joysticks and gamepads' CONFIG_INPUT_SIDEWINDER $CONFIG_INPUT
-
-   comment 'Serial port support'
-      dep_tristate '  Serial port input line discipline' CONFIG_INPUT_SERPORT $CONFIG_INPUT
-
-   comment 'Serial port joysticks'
-      dep_tristate '  Logitech WingMan Warrior joystick' CONFIG_INPUT_WARRIOR $CONFIG_INPUT
-      dep_tristate '  LogiCad3d Magellan/SpaceMouse 6dof controller' CONFIG_INPUT_MAGELLAN $CONFIG_INPUT
-      dep_tristate '  SpaceTec SpaceOrb/Avenger 6dof controller' CONFIG_INPUT_SPACEORB $CONFIG_INPUT
-      dep_tristate '  SpaceTec SpaceBall 4000 FLX 6dof controller' CONFIG_INPUT_SPACEBALL $CONFIG_INPUT
-      dep_tristate '  Gravis Stinger gamepad' CONFIG_INPUT_STINGER $CONFIG_INPUT
-      dep_tristate '  I-Force/Serial controllers' CONFIG_INPUT_IFORCE_232 $CONFIG_INPUT
-      dep_tristate '  I-Force/USB controllers' CONFIG_INPUT_IFORCE_USB $CONFIG_INPUT $CONFIG_USB
-
-   comment 'Parallel port joysticks'
-   if [ "$CONFIG_PARPORT" != "n" ]; then
-      dep_tristate '  Multisystem, Sega Genesis, Saturn joysticks and gamepads' CONFIG_INPUT_DB9 $CONFIG_INPUT $CONFIG_PARPORT
-      dep_tristate '  Multisystem, NES, SNES, N64, PSX joysticks and gamepads' CONFIG_INPUT_GAMECON $CONFIG_INPUT $CONFIG_PARPORT
-      dep_tristate '  Multisystem joysticks via TurboGraFX device' CONFIG_INPUT_TURBOGRAFX $CONFIG_INPUT $CONFIG_PARPORT
+tristate 'Game port support' CONFIG_INPUT_GAMEPORT
+   dep_tristate '  Classic ISA/PnP gameports' CONFIG_INPUT_NS558 $CONFIG_INPUT_GAMEPORT
+   dep_tristate '  PDPI Lightning 4 gamecard' CONFIG_INPUT_LIGHTNING $CONFIG_INPUT_GAMEPORT
+   dep_tristate '  Aureal Vortex and Trident 4DWave gameports' CONFIG_INPUT_PCIGAME $CONFIG_INPUT_GAMEPORT
+   dep_tristate '  Crystal SoundFusion gameports' CONFIG_INPUT_CS461X  $CONFIG_INPUT_GAMEPORT
+   dep_tristate '  SoundBlaster Live! gameports' CONFIG_INPUT_EMU10K1 $CONFIG_INPUT_GAMEPORT
+if [ "$CONFIG_INPUT_GAMEPORT" != "n" ]; then
+   comment '  ES1370, ES1371 (SoundBlaster 64, 128), SonicVibes and'
+   comment '  ESS Solo1 gameports are handled by the sound drivers'
+fi
+
+tristate 'Serial port device support' CONFIG_INPUT_SERIO
+   dep_tristate '  Serial port input line discipline' CONFIG_INPUT_SERPORT $CONFIG_INPUT_SERIO
+
+if [ "$CONFIG_INPUT" == "n" ]; then
+   comment 'Input core support is needed for joysticks'
+else
+   comment 'Joysticks'
+
+   comment '  Gameport joysticks'
+
+   if [ "$CONFIG_INPUT_GAMEPORT" == "n" ]; then
+      comment '    Gameport support is needed for gameport joysticks'
+   fi
+
+   dep_tristate '    Classic PC analog joysticks and gamepads' CONFIG_INPUT_ANALOG $CONFIG_INPUT $CONFIG_INPUT_GAMEPORT
+   dep_tristate '    Assasin 3D and MadCatz Panther devices' CONFIG_INPUT_A3D $CONFIG_INPUT $CONFIG_INPUT_GAMEPORT
+   dep_tristate '    Logitech ADI digital joysticks and gamepads' CONFIG_INPUT_ADI $CONFIG_INPUT $CONFIG_INPUT_GAMEPORT
+   dep_tristate '    Creative Labs Blaster Cobra gamepad' CONFIG_INPUT_COBRA $CONFIG_INPUT $CONFIG_INPUT_GAMEPORT
+   dep_tristate '    Genius Flight2000 Digital joysticks and gamepads' CONFIG_INPUT_GF2K $CONFIG_INPUT $CONFIG_INPUT_GAMEPORT
+   dep_tristate '    Gravis GrIP joysticks and gamepads' CONFIG_INPUT_GRIP $CONFIG_INPUT $CONFIG_INPUT_GAMEPORT
+   dep_tristate '    InterAct digital joysticks and gamepads' CONFIG_INPUT_INTERACT $CONFIG_INPUT $CONFIG_INPUT_GAMEPORT
+   dep_tristate '    ThrustMaster DirectConnect joysticks and gamepads' CONFIG_INPUT_TMDC $CONFIG_INPUT $CONFIG_INPUT_GAMEPORT
+   dep_tristate '    Microsoft SideWinder digital joysticks and gamepads' CONFIG_INPUT_SIDEWINDER $CONFIG_INPUT $CONFIG_INPUT_GAMEPORT
+
+   comment '  Serial port joysticks'
+
+   if [ "$CONFIG_INPUT_SERIO" == "n" ]; then
+      comment '    Serial port device support is needed for serial joysticks'
+   fi
+
+   dep_tristate '    I-Force Serial joysticks and wheels' CONFIG_INPUT_IFORCE_232 $CONFIG_INPUT $CONFIG_INPUT_SERIO
+   dep_tristate '    Logitech WingMan Warrior joystick' CONFIG_INPUT_WARRIOR $CONFIG_INPUT $CONFIG_INPUT_SERIO
+   dep_tristate '    LogiCad3d Magellan/SpaceMouse 6dof controller' CONFIG_INPUT_MAGELLAN $CONFIG_INPUT $CONFIG_INPUT_SERIO
+   dep_tristate '    SpaceTec SpaceOrb/Avenger 6dof controller' CONFIG_INPUT_SPACEORB $CONFIG_INPUT $CONFIG_INPUT_SERIO
+   dep_tristate '    SpaceTec SpaceBall 4000 FLX 6dof controller' CONFIG_INPUT_SPACEBALL $CONFIG_INPUT $CONFIG_INPUT_SERIO
+   dep_tristate '    Gravis Stinger gamepad' CONFIG_INPUT_STINGER $CONFIG_INPUT $CONFIG_INPUT_SERIO
+
+   comment '  USB joysticks'
+
+   if [ "$CONFIG_INPUT_SERIO" == "n" ]; then
+      comment '    USB support is needed for USB joysticks'
    else
-      comment '  Parport support is needed for parallel port joysticks'
+      comment '    Normal USB joystick are handled by USB HID driver'
    fi
 
+   dep_tristate '    I-Force USB joysticks and wheels' CONFIG_INPUT_IFORCE_USB $CONFIG_INPUT $CONFIG_USB
+
+   comment '  Parallel port joysticks'
+
+   if [ "$CONFIG_PARPORT" == "n" ]; then
+      comment '    Parport support is needed for parallel port joysticks'
+   fi
+
+   dep_tristate '    Multisystem, Sega Genesis, Saturn joysticks and gamepads' CONFIG_INPUT_DB9 $CONFIG_INPUT $CONFIG_PARPORT
+   dep_tristate '    Multisystem, NES, SNES, N64, PSX joysticks and gamepads' CONFIG_INPUT_GAMECON $CONFIG_INPUT $CONFIG_PARPORT
+   dep_tristate '    Multisystem joysticks via TurboGraFX device' CONFIG_INPUT_TURBOGRAFX $CONFIG_INPUT $CONFIG_PARPORT
+
    if [ "$CONFIG_AMIGA" = "y" ]; then
-   comment 'System joysticks'
-      dep_tristate '  Amiga joysticks' CONFIG_INPUT_AMIJOY $CONFIG_INPUT
+      comment '  System joysticks'
+      dep_tristate '    Amiga joysticks' CONFIG_INPUT_AMIJOY $CONFIG_INPUT
    fi
-else
-   comment 'Input core support is needed for joysticks'
+
 fi
 
 endmenu
drivers/char/joystick/Makefile +24 -21

55 lines not on this page · raw message

include/linux/gameport.h +1 -1
diff -urN linux-2.4.5-ac4/include/linux/gameport.h linux/include/linux/gameport.h
@@ -68,7 +68,7 @@
 void gameport_close(struct gameport *gameport);
 void gameport_rescan(struct gameport *gameport);
 
-#ifdef CONFIG_JOYSTICK
+#if defined(CONFIG_INPUT_GAMEPORT) || (defined(CONFIG_INPUT_GAMEPORT_MODULE) && defined(MODULE))
 void gameport_register_port(struct gameport *gameport);
 void gameport_unregister_port(struct gameport *gameport);
 #else
#4 lore raw

drivers/char/joystick/Config.in line 9

Quoted 13 lines · Vojtech Pavlik
Quoted 6 lines · Keith Owens

This is messy. gameport.h is included by code outside the joystick directory and it needs to expand differently based on whether gameport.o is compiled or not. Also gameport.o needs to be built in if _any_ consumers are built in (either joystick or sound), it needs to be a module otherwise. Lots of cross config and cross directory dependencies :(.

What about this solution? It's a little cleaner.

diff -urN linux-2.4.5-ac4/drivers/char/joystick/Config.in linux/drivers/char/joystick/Config.in

drivers/char/joystick/Config.in +2 -0
+tristate 'Game port support' CONFIG_INPUT_GAMEPORT
+   dep_tristate '  Classic ISA/PnP gameports' CONFIG_INPUT_NS558 $CONFIG_INPUT_GAMEPORT

CONFIG_INPUT_GAMEPORT must be a derived symbol, not a user selected symbol. CONFIG_INPUT_GAMEPORT is 'n' if no gameport drivers are installed. It is 'm' if all gameport drivers are modules *and* all users of gameport_register_port() are modules, otherwise it is 'y'.

With your patch, if a user selects CONFIG_INPUT_GAMEPORT=m and CONFIG_SOUND_ES1370=y then the built in es1370 driver has unresolved references to gameport_register_port() which is in a module, vmlinux will not link. That is why I derived CONFIG_INPUT_GAMEPORT based on the config options in two separate directories.

#5 lore raw
In reply to Vojtech Pavlik
Quoted 21 lines · Keith Owens

drivers/char/joystick/Config.in line 9

Quoted 13 lines · Vojtech Pavlik
Quoted 6 lines · Keith Owens

This is messy. gameport.h is included by code outside the joystick directory and it needs to expand differently based on whether gameport.o is compiled or not. Also gameport.o needs to be built in if _any_ consumers are built in (either joystick or sound), it needs to be a module otherwise. Lots of cross config and cross directory dependencies :(.

What about this solution? It's a little cleaner.

diff -urN linux-2.4.5-ac4/drivers/char/joystick/Config.in linux/drivers/char/joystick/Config.in

drivers/char/joystick/Config.in +2 -0
+tristate 'Game port support' CONFIG_INPUT_GAMEPORT
+   dep_tristate '  Classic ISA/PnP gameports' CONFIG_INPUT_NS558 $CONFIG_INPUT_GAMEPORT

CONFIG_INPUT_GAMEPORT must be a derived symbol, not a user selected symbol. CONFIG_INPUT_GAMEPORT is 'n' if no gameport drivers are installed. It is 'm' if all gameport drivers are modules *and* all users of gameport_register_port() are modules, otherwise it is 'y'.

Quoted 5 lines

With your patch, if a user selects CONFIG_INPUT_GAMEPORT=m and CONFIG_SOUND_ES1370=y then the built in es1370 driver has unresolved references to gameport_register_port() which is in a module, vmlinux will not link. That is why I derived CONFIG_INPUT_GAMEPORT based on the config options in two separate directories.

Have you tried the patch? Because the gameport.h define has:

#if defined(CONFIG_INPUT_GAMEPORT) || (defined(CONFIG_INPUT_GAMEPORT_MODULE) && defined(MODULE)) void gameport_register_port(struct gameport *gameport);
void gameport_unregister_port(struct gameport *gameport);
#else
void __inline__ gameport_register_port(struct gameport *gameport) { return; } void __inline__ gameport_unregister_port(struct gameport *gameport) { return; } #endif

I think it should work.

Signature · 2 lines
Vojtech Pavlik
SuSE Labs
#6 lore raw
Quoted 9 lines · Vojtech Pavlik
Quoted 5 lines · Keith Owens

With your patch, if a user selects CONFIG_INPUT_GAMEPORT=m and CONFIG_SOUND_ES1370=y then the built in es1370 driver has unresolved references to gameport_register_port() which is in a module, vmlinux will not link. That is why I derived CONFIG_INPUT_GAMEPORT based on the config options in two separate directories.

Have you tried the patch? Because the gameport.h define has:

Quoted 7 lines

#if defined(CONFIG_INPUT_GAMEPORT) || (defined(CONFIG_INPUT_GAMEPORT_MODULE) && defined(MODULE)) void gameport_register_port(struct gameport *gameport);
void gameport_unregister_port(struct gameport *gameport);
#else
void __inline__ gameport_register_port(struct gameport *gameport) { return; } void __inline__ gameport_unregister_port(struct gameport *gameport) { return; } #endif

When the user has gameport hardware compiled it as a module and they have es1371 bult into the kernel then es1371 silently ignores the gameport, even if the gameport modules has been loaded. This violates the principle of least surprise, a user configuring both gameport and es1371 expects to use the gameport, kbuild should support that instead of silently ignoring the combination.

#7 lore raw
In reply to Vojtech Pavlik
Quoted 19 lines · Keith Owens
Quoted 9 lines · Vojtech Pavlik
Quoted 5 lines · Keith Owens

With your patch, if a user selects CONFIG_INPUT_GAMEPORT=m and CONFIG_SOUND_ES1370=y then the built in es1370 driver has unresolved references to gameport_register_port() which is in a module, vmlinux will not link. That is why I derived CONFIG_INPUT_GAMEPORT based on the config options in two separate directories.

Have you tried the patch? Because the gameport.h define has:

Quoted 7 lines

#if defined(CONFIG_INPUT_GAMEPORT) || (defined(CONFIG_INPUT_GAMEPORT_MODULE) && defined(MODULE)) void gameport_register_port(struct gameport *gameport);
void gameport_unregister_port(struct gameport *gameport);
#else
void __inline__ gameport_register_port(struct gameport *gameport) { return; } void __inline__ gameport_unregister_port(struct gameport *gameport) { return; } #endif

Quoted 6 lines

When the user has gameport hardware compiled it as a module and they have es1371 bult into the kernel then es1371 silently ignores the gameport, even if the gameport modules has been loaded. This violates the principle of least surprise, a user configuring both gameport and es1371 expects to use the gameport, kbuild should support that instead of silently ignoring the combination.

True. Is this worse than the ugliness in your patch?

Signature · 2 lines
Vojtech Pavlik
SuSE Labs
#8 lore raw
Quoted 9 lines · Vojtech Pavlik
Quoted 6 lines · Keith Owens

When the user has gameport hardware compiled it as a module and they have es1371 bult into the kernel then es1371 silently ignores the gameport, even if the gameport modules has been loaded. This violates the principle of least surprise, a user configuring both gameport and es1371 expects to use the gameport, kbuild should support that instead of silently ignoring the combination.

True. Is this worse than the ugliness in your patch?

Only kernel developers see the ugly patch. The unexpected presence or absence of gameport code affects all users. User always win that argument. Adding a warning is just as bad, kbuild either generates a valid config or nothing at all. Users never check warnings anyway :(.

#9 lore raw
In reply to Vojtech Pavlik
Quoted 21 lines · Vojtech Pavlik
Quoted 19 lines · Keith Owens
Quoted 16 lines · Vojtech Pavlik
Quoted 5 lines · Keith Owens

With your patch, if a user selects CONFIG_INPUT_GAMEPORT=m and CONFIG_SOUND_ES1370=y then the built in es1370 driver has unresolved references to gameport_register_port() which is in a module, vmlinux will not link. That is why I derived CONFIG_INPUT_GAMEPORT based on the config options in two separate directories.

Have you tried the patch? Because the gameport.h define has:

#if defined(CONFIG_INPUT_GAMEPORT) || (defined(CONFIG_INPUT_GAMEPORT_MODULE) && defined(MODULE)) void gameport_register_port(struct gameport *gameport);
void gameport_unregister_port(struct gameport *gameport);
#else
void __inline__ gameport_register_port(struct gameport *gameport) { return; } void __inline__ gameport_unregister_port(struct gameport *gameport) { return; } #endif

Quoted 8 lines
Quoted 6 lines

When the user has gameport hardware compiled it as a module and they have es1371 bult into the kernel then es1371 silently ignores the gameport, even if the gameport modules has been loaded. This violates the principle of least surprise, a user configuring both gameport and es1371 expects to use the gameport, kbuild should support that instead of silently ignoring the combination.

True. Is this worse than the ugliness in your patch?

How about a warning displayed in the config process?

Signature · 2 lines
Vojtech Pavlik
SuSE Labs