linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PATCH - gameport_{,un}register_port must be static when inline
@ 2001-10-04  4:19 Neil Brown
  2001-10-04  4:31 ` Keith Owens
  0 siblings, 1 reply; 8+ messages in thread
From: Neil Brown @ 2001-10-04  4:19 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel


Linus,
 2.4.11-pre2 wont compile with some combinations of sound card drivers
 if CONFIG_INPUT_GAMEPORT is not defined, as every driver than include
 gameport.h causes "gameport_register_port" to be defined as a symbol
 and there is a conflict.

 This patch makes the relevant inline functions "static" to avoid this
 problem.

NeilBrown


--- ./include/linux/gameport.h	2001/10/04 02:45:24	1.1
+++ ./include/linux/gameport.h	2001/10/04 03:51:09	1.2
@@ -74,8 +74,8 @@
 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; }
+static void __inline__ gameport_register_port(struct gameport *gameport) { return; }
+static void __inline__ gameport_unregister_port(struct gameport *gameport) { return; }
 #endif
 
 void gameport_register_device(struct gameport_dev *dev);

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

* Re: PATCH - gameport_{,un}register_port must be static when inline
  2001-10-04  4:19 PATCH - gameport_{,un}register_port must be static when inline Neil Brown
@ 2001-10-04  4:31 ` Keith Owens
  2001-10-04  5:04   ` Neil Brown
  2001-10-04 20:41   ` Alan Cox
  0 siblings, 2 replies; 8+ messages in thread
From: Keith Owens @ 2001-10-04  4:31 UTC (permalink / raw)
  To: Neil Brown; +Cc: Linus Torvalds, linux-kernel

On Thu, 4 Oct 2001 14:19:13 +1000 (EST), 
Neil Brown <neilb@cse.unsw.edu.au> wrote:
>Linus,
> 2.4.11-pre2 wont compile with some combinations of sound card drivers
> if CONFIG_INPUT_GAMEPORT is not defined, as every driver than include
> gameport.h causes "gameport_register_port" to be defined as a symbol
> and there is a conflict.
>
> This patch makes the relevant inline functions "static" to avoid this
> problem.

Please don't.  This was fixed in the -ac trees several weeks ago, the
correct fix is to move the input rewrite from -ac to Linus's tree.
That is up to the maintainer, Vojtech Pavlik.


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

* Re: PATCH - gameport_{,un}register_port must be static when inline
  2001-10-04  4:31 ` Keith Owens
@ 2001-10-04  5:04   ` Neil Brown
  2001-10-04  5:10     ` Keith Owens
  2001-10-04  5:30     ` Keith Owens
  2001-10-04 20:41   ` Alan Cox
  1 sibling, 2 replies; 8+ messages in thread
From: Neil Brown @ 2001-10-04  5:04 UTC (permalink / raw)
  To: Keith Owens; +Cc: linux-kernel

On Thursday October 4, kaos@ocs.com.au wrote:
> On Thu, 4 Oct 2001 14:19:13 +1000 (EST), 
> Neil Brown <neilb@cse.unsw.edu.au> wrote:
> >Linus,
> > 2.4.11-pre2 wont compile with some combinations of sound card drivers
> > if CONFIG_INPUT_GAMEPORT is not defined, as every driver than include
> > gameport.h causes "gameport_register_port" to be defined as a symbol
> > and there is a conflict.
> >
> > This patch makes the relevant inline functions "static" to avoid this
> > problem.
> 
> Please don't.  This was fixed in the -ac trees several weeks ago, the
> correct fix is to move the input rewrite from -ac to Linus's tree.
> That is up to the maintainer, Vojtech Pavlik.

Are you sure?  2.4.10 seems to have a big input rewrite, and
patch-2.4.10-ac4 doesn't change gameport.h and makes only minimal
changes to esssolo1.c, one of the drivers in question.

NeilBrown

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

* Re: PATCH - gameport_{,un}register_port must be static when inline
  2001-10-04  5:04   ` Neil Brown
@ 2001-10-04  5:10     ` Keith Owens
  2001-10-04  5:32       ` Neil Brown
  2001-10-04  5:30     ` Keith Owens
  1 sibling, 1 reply; 8+ messages in thread
From: Keith Owens @ 2001-10-04  5:10 UTC (permalink / raw)
  To: Neil Brown; +Cc: linux-kernel

On Thu, 4 Oct 2001 15:04:39 +1000 (EST), 
Neil Brown <neilb@cse.unsw.edu.au> wrote:
>Are you sure?  2.4.10 seems to have a big input rewrite, and
>patch-2.4.10-ac4 doesn't change gameport.h and makes only minimal
>changes to esssolo1.c, one of the drivers in question.

http://marc.theaimsgroup.com/?l=linux-kernel&m=99419452230792&w=2, find
gameport.  It was finally fixed in 2.4.5-ac17.


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

* Re: PATCH - gameport_{,un}register_port must be static when inline
  2001-10-04  5:04   ` Neil Brown
  2001-10-04  5:10     ` Keith Owens
@ 2001-10-04  5:30     ` Keith Owens
  1 sibling, 0 replies; 8+ messages in thread
From: Keith Owens @ 2001-10-04  5:30 UTC (permalink / raw)
  To: Neil Brown; +Cc: linux-kernel

On Thu, 4 Oct 2001 15:04:39 +1000 (EST), 
Neil Brown <neilb@cse.unsw.edu.au> wrote:
>Are you sure?  2.4.10 seems to have a big input rewrite, and
>patch-2.4.10-ac4 doesn't change gameport.h and makes only minimal
>changes to esssolo1.c, one of the drivers in question.

Looks like I jumped the gun, most of the -ac changes are in Linus's
tree now.  What .config gets the problem?


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

* Re: PATCH - gameport_{,un}register_port must be static when inline
  2001-10-04  5:10     ` Keith Owens
@ 2001-10-04  5:32       ` Neil Brown
  2001-10-04 12:50         ` Keith Owens
  0 siblings, 1 reply; 8+ messages in thread
From: Neil Brown @ 2001-10-04  5:32 UTC (permalink / raw)
  To: Keith Owens; +Cc: linux-kernel

On Thursday October 4, kaos@ocs.com.au wrote:
> On Thu, 4 Oct 2001 15:04:39 +1000 (EST), 
> Neil Brown <neilb@cse.unsw.edu.au> wrote:
> >Are you sure?  2.4.10 seems to have a big input rewrite, and
> >patch-2.4.10-ac4 doesn't change gameport.h and makes only minimal
> >changes to esssolo1.c, one of the drivers in question.
> 
> http://marc.theaimsgroup.com/?l=linux-kernel&m=99419452230792&w=2, find
> gameport.  It was finally fixed in 2.4.5-ac17.

This doesn't negate the fact that it *is* broken in linus-latest, and
it *isn't* fixed in alan-latest.

Try compiling a kernel with (at least)

# CONFIG_INPUT_GAMEPORT is not set
CONFIG_SOUND=y
CONFIG_SOUND_ESSSOLO1=y
CONFIG_SOUND_ES1370=y

and see what I mean.

I get:

ld -m elf_i386  -r -o sounddrivers.o soundcore.o es1370.o esssolo1.o maestro.o maestro3.o ac97_codec.o
esssolo1.o: In function `gameport_register_port':
esssolo1.o(.text+0x6d60): multiple definition of `gameport_register_port'
es1370.o(.text+0x7ea4): first defined here
esssolo1.o: In function `gameport_unregister_port':
esssolo1.o(.text+0x6d64): multiple definition of `gameport_unregister_port'
es1370.o(.text+0x7ea8): first defined here

NeilBrown

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

* Re: PATCH - gameport_{,un}register_port must be static when inline
  2001-10-04  5:32       ` Neil Brown
@ 2001-10-04 12:50         ` Keith Owens
  0 siblings, 0 replies; 8+ messages in thread
From: Keith Owens @ 2001-10-04 12:50 UTC (permalink / raw)
  To: Neil Brown; +Cc: linux-kernel

On Thu, 4 Oct 2001 15:32:54 +1000 (EST), 
Neil Brown <neilb@cse.unsw.edu.au> wrote:
># CONFIG_INPUT_GAMEPORT is not set
>CONFIG_SOUND=y
>CONFIG_SOUND_ESSSOLO1=y
>CONFIG_SOUND_ES1370=y

My apologies, the symptoms sounded like a bug I fixed in 2.4.5-ac but
are actually different.  Your original patch was correct.


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

* Re: PATCH - gameport_{,un}register_port must be static when inline
  2001-10-04  4:31 ` Keith Owens
  2001-10-04  5:04   ` Neil Brown
@ 2001-10-04 20:41   ` Alan Cox
  1 sibling, 0 replies; 8+ messages in thread
From: Alan Cox @ 2001-10-04 20:41 UTC (permalink / raw)
  To: Keith Owens; +Cc: Neil Brown, Linus Torvalds, linux-kernel

> Please don't.  This was fixed in the -ac trees several weeks ago, the
> correct fix is to move the input rewrite from -ac to Linus's tree.
> That is up to the maintainer, Vojtech Pavlik.

The core stuff has been done and I've sent Linus the remaining pieces
now.

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

end of thread, other threads:[~2001-10-04 20:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-04  4:19 PATCH - gameport_{,un}register_port must be static when inline Neil Brown
2001-10-04  4:31 ` Keith Owens
2001-10-04  5:04   ` Neil Brown
2001-10-04  5:10     ` Keith Owens
2001-10-04  5:32       ` Neil Brown
2001-10-04 12:50         ` Keith Owens
2001-10-04  5:30     ` Keith Owens
2001-10-04 20:41   ` Alan Cox

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).