linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: joystick - work around "adi" module name confict
@ 2020-06-09 10:06 Arnd Bergmann
  2020-06-09 13:52 ` Guenter Roeck
  2020-06-11 11:05 ` Masahiro Yamada
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2020-06-09 10:06 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Arnd Bergmann, Guenter Roeck, Greg Kroah-Hartman,
	Masahiro Yamada, linux-input, Markus Koch, linux-kernel

Making module name conflicts a fatal error breaks sparc64
allmodconfig:

Error log:
error: the following would cause module name conflict:
  drivers/char/adi.ko
  drivers/input/joystick/adi.ko

Renaming one of the modules would solve the problem, but then cause other
problems because neither of them is automatically loaded and changing
the name is likely to break any setup that relies on manually loading
it by name.

As there is probably no sparc64 system with this kind of ancient joystick
attached, work around it by adding a Kconfig dependency that forbids
them from both being modules.  It is still possible to build the joystick
driver if the sparc64 adi driver is built-in.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
This should get merged through the kbuild tree together
with the patch that turns the warning into an error, if the
joystick maintainers are ok with the hack.
---
 drivers/input/joystick/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/joystick/Kconfig b/drivers/input/joystick/Kconfig
index 940b744639c7..6f73f02059b5 100644
--- a/drivers/input/joystick/Kconfig
+++ b/drivers/input/joystick/Kconfig
@@ -45,6 +45,7 @@ config JOYSTICK_A3D
 config JOYSTICK_ADI
 	tristate "Logitech ADI digital joysticks and gamepads"
 	select GAMEPORT
+	depends on ADI!=m # avoid module name conflict
 	help
 	  Say Y here if you have a Logitech controller using the ADI
 	  protocol over the PC gameport.
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Input: joystick - work around "adi" module name confict
  2020-06-09 10:06 [PATCH] Input: joystick - work around "adi" module name confict Arnd Bergmann
@ 2020-06-09 13:52 ` Guenter Roeck
  2020-06-11 11:05 ` Masahiro Yamada
  1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2020-06-09 13:52 UTC (permalink / raw)
  To: Arnd Bergmann, Dmitry Torokhov
  Cc: Greg Kroah-Hartman, Masahiro Yamada, linux-input, Markus Koch,
	linux-kernel

On 6/9/20 3:06 AM, Arnd Bergmann wrote:
> Making module name conflicts a fatal error breaks sparc64
> allmodconfig:
> 
> Error log:
> error: the following would cause module name conflict:
>   drivers/char/adi.ko
>   drivers/input/joystick/adi.ko
> 
> Renaming one of the modules would solve the problem, but then cause other
> problems because neither of them is automatically loaded and changing
> the name is likely to break any setup that relies on manually loading
> it by name.
> 
> As there is probably no sparc64 system with this kind of ancient joystick
> attached, work around it by adding a Kconfig dependency that forbids
> them from both being modules.  It is still possible to build the joystick
> driver if the sparc64 adi driver is built-in.
> 
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: linux-input@vger.kernel.org
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
> This should get merged through the kbuild tree together
> with the patch that turns the warning into an error, if the
> joystick maintainers are ok with the hack.
> ---
>  drivers/input/joystick/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/input/joystick/Kconfig b/drivers/input/joystick/Kconfig
> index 940b744639c7..6f73f02059b5 100644
> --- a/drivers/input/joystick/Kconfig
> +++ b/drivers/input/joystick/Kconfig
> @@ -45,6 +45,7 @@ config JOYSTICK_A3D
>  config JOYSTICK_ADI
>  	tristate "Logitech ADI digital joysticks and gamepads"
>  	select GAMEPORT
> +	depends on ADI!=m # avoid module name conflict
>  	help
>  	  Say Y here if you have a Logitech controller using the ADI
>  	  protocol over the PC gameport.
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Input: joystick - work around "adi" module name confict
  2020-06-09 10:06 [PATCH] Input: joystick - work around "adi" module name confict Arnd Bergmann
  2020-06-09 13:52 ` Guenter Roeck
@ 2020-06-11 11:05 ` Masahiro Yamada
  1 sibling, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2020-06-11 11:05 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Dmitry Torokhov, Guenter Roeck, Greg Kroah-Hartman, linux-input,
	Markus Koch, Linux Kernel Mailing List

On Tue, Jun 9, 2020 at 7:07 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> Making module name conflicts a fatal error breaks sparc64
> allmodconfig:
>
> Error log:
> error: the following would cause module name conflict:
>   drivers/char/adi.ko
>   drivers/input/joystick/adi.ko
>
> Renaming one of the modules would solve the problem, but then cause other
> problems because neither of them is automatically loaded and changing
> the name is likely to break any setup that relies on manually loading
> it by name.
>
> As there is probably no sparc64 system with this kind of ancient joystick
> attached, work around it by adding a Kconfig dependency that forbids
> them from both being modules.  It is still possible to build the joystick
> driver if the sparc64 adi driver is built-in.
>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: linux-input@vger.kernel.org
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> This should get merged through the kbuild tree together
> with the patch that turns the warning into an error, if the
> joystick maintainers are ok with the hack.

Note:
Dmitry picked up this patch.
(commit 751ad34fbad74c3ed4a9ede24764b4253d4faa84)





> ---
>  drivers/input/joystick/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/input/joystick/Kconfig b/drivers/input/joystick/Kconfig
> index 940b744639c7..6f73f02059b5 100644
> --- a/drivers/input/joystick/Kconfig
> +++ b/drivers/input/joystick/Kconfig
> @@ -45,6 +45,7 @@ config JOYSTICK_A3D
>  config JOYSTICK_ADI
>         tristate "Logitech ADI digital joysticks and gamepads"
>         select GAMEPORT
> +       depends on ADI!=m # avoid module name conflict
>         help
>           Say Y here if you have a Logitech controller using the ADI
>           protocol over the PC gameport.
> --
> 2.26.2
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-11 11:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-09 10:06 [PATCH] Input: joystick - work around "adi" module name confict Arnd Bergmann
2020-06-09 13:52 ` Guenter Roeck
2020-06-11 11:05 ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).