* [2.6 patch] drivers/input/: possible cleanups
@ 2005-11-04 12:35 Adrian Bunk
2005-11-04 12:42 ` Vojtech Pavlik
0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2005-11-04 12:35 UTC (permalink / raw)
To: vojtech; +Cc: linux-input, linux-kernel, linux-joystick
This patch contains the following possible cleanups:
- make needlessly glbal code static
- gameport/gameport: #if 0 the unused global function gameport_reconnect
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/input/gameport/gameport.c | 2 ++
drivers/input/joystick/twidjoy.c | 4 ++--
drivers/input/touchscreen/mk712.c | 2 +-
3 files changed, 5 insertions(+), 3 deletions(-)
--- linux-2.6.14-rc5-mm1-full/drivers/input/joystick/twidjoy.c.old 2005-11-04 11:37:38.000000000 +0100
+++ linux-2.6.14-rc5-mm1-full/drivers/input/joystick/twidjoy.c 2005-11-04 11:38:01.000000000 +0100
@@ -265,13 +265,13 @@
* The functions for inserting/removing us as a module.
*/
-int __init twidjoy_init(void)
+static int __init twidjoy_init(void)
{
serio_register_driver(&twidjoy_drv);
return 0;
}
-void __exit twidjoy_exit(void)
+static void __exit twidjoy_exit(void)
{
serio_unregister_driver(&twidjoy_drv);
}
--- linux-2.6.14-rc5-mm1-full/drivers/input/touchscreen/mk712.c.old 2005-11-04 11:38:20.000000000 +0100
+++ linux-2.6.14-rc5-mm1-full/drivers/input/touchscreen/mk712.c 2005-11-04 11:38:29.000000000 +0100
@@ -154,7 +154,7 @@
spin_unlock_irqrestore(&mk712_lock, flags);
}
-int __init mk712_init(void)
+static int __init mk712_init(void)
{
int err;
--- linux-2.6.14-rc5-mm1-full/drivers/input/gameport/gameport.c.old 2005-11-04 11:38:52.000000000 +0100
+++ linux-2.6.14-rc5-mm1-full/drivers/input/gameport/gameport.c 2005-11-04 11:39:32.000000000 +0100
@@ -637,10 +637,12 @@
gameport_queue_event(gameport, NULL, GAMEPORT_RESCAN);
}
+#if 0
void gameport_reconnect(struct gameport *gameport)
{
gameport_queue_event(gameport, NULL, GAMEPORT_RECONNECT);
}
+#endif /* 0 */
/*
* Submits register request to kgameportd for subsequent execution.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] drivers/input/: possible cleanups
2005-11-04 12:35 [2.6 patch] drivers/input/: possible cleanups Adrian Bunk
@ 2005-11-04 12:42 ` Vojtech Pavlik
2005-11-04 12:57 ` Adrian Bunk
0 siblings, 1 reply; 6+ messages in thread
From: Vojtech Pavlik @ 2005-11-04 12:42 UTC (permalink / raw)
To: Adrian Bunk; +Cc: linux-input, linux-kernel, linux-joystick
On Fri, Nov 04, 2005 at 01:35:41PM +0100, Adrian Bunk wrote:
> This patch contains the following possible cleanups:
> - make needlessly glbal code static
Agreed.
> - gameport/gameport: #if 0 the unused global function gameport_reconnect
That one should be an EXPORT_SYMBOL() API. If the export is missing,
then that's the bug that needs to be fixed.
>
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
>
> ---
>
> drivers/input/gameport/gameport.c | 2 ++
> drivers/input/joystick/twidjoy.c | 4 ++--
> drivers/input/touchscreen/mk712.c | 2 +-
> 3 files changed, 5 insertions(+), 3 deletions(-)
>
> --- linux-2.6.14-rc5-mm1-full/drivers/input/joystick/twidjoy.c.old 2005-11-04 11:37:38.000000000 +0100
> +++ linux-2.6.14-rc5-mm1-full/drivers/input/joystick/twidjoy.c 2005-11-04 11:38:01.000000000 +0100
> @@ -265,13 +265,13 @@
> * The functions for inserting/removing us as a module.
> */
>
> -int __init twidjoy_init(void)
> +static int __init twidjoy_init(void)
> {
> serio_register_driver(&twidjoy_drv);
> return 0;
> }
>
> -void __exit twidjoy_exit(void)
> +static void __exit twidjoy_exit(void)
> {
> serio_unregister_driver(&twidjoy_drv);
> }
> --- linux-2.6.14-rc5-mm1-full/drivers/input/touchscreen/mk712.c.old 2005-11-04 11:38:20.000000000 +0100
> +++ linux-2.6.14-rc5-mm1-full/drivers/input/touchscreen/mk712.c 2005-11-04 11:38:29.000000000 +0100
> @@ -154,7 +154,7 @@
> spin_unlock_irqrestore(&mk712_lock, flags);
> }
>
> -int __init mk712_init(void)
> +static int __init mk712_init(void)
> {
> int err;
>
> --- linux-2.6.14-rc5-mm1-full/drivers/input/gameport/gameport.c.old 2005-11-04 11:38:52.000000000 +0100
> +++ linux-2.6.14-rc5-mm1-full/drivers/input/gameport/gameport.c 2005-11-04 11:39:32.000000000 +0100
> @@ -637,10 +637,12 @@
> gameport_queue_event(gameport, NULL, GAMEPORT_RESCAN);
> }
>
> +#if 0
> void gameport_reconnect(struct gameport *gameport)
> {
> gameport_queue_event(gameport, NULL, GAMEPORT_RECONNECT);
> }
> +#endif /* 0 */
>
> /*
> * Submits register request to kgameportd for subsequent execution.
>
>
--
Vojtech Pavlik
SuSE Labs, SuSE CR
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] drivers/input/: possible cleanups
2005-11-04 12:42 ` Vojtech Pavlik
@ 2005-11-04 12:57 ` Adrian Bunk
2005-11-04 13:12 ` Vojtech Pavlik
0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2005-11-04 12:57 UTC (permalink / raw)
To: Vojtech Pavlik; +Cc: linux-input, linux-kernel, linux-joystick
On Fri, Nov 04, 2005 at 01:42:07PM +0100, Vojtech Pavlik wrote:
> On Fri, Nov 04, 2005 at 01:35:41PM +0100, Adrian Bunk wrote:
> > This patch contains the following possible cleanups:
> > - make needlessly glbal code static
>
> Agreed.
>
> > - gameport/gameport: #if 0 the unused global function gameport_reconnect
>
> That one should be an EXPORT_SYMBOL() API. If the export is missing,
> then that's the bug that needs to be fixed.
>...
There isn't even a header providing a function prototype which is quite
strange for a part of an API.
> Vojtech Pavlik
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] drivers/input/: possible cleanups
2005-11-04 12:57 ` Adrian Bunk
@ 2005-11-04 13:12 ` Vojtech Pavlik
2005-11-05 15:09 ` Adrian Bunk
0 siblings, 1 reply; 6+ messages in thread
From: Vojtech Pavlik @ 2005-11-04 13:12 UTC (permalink / raw)
To: Adrian Bunk; +Cc: linux-input, linux-kernel, linux-joystick
On Fri, Nov 04, 2005 at 01:57:42PM +0100, Adrian Bunk wrote:
> On Fri, Nov 04, 2005 at 01:42:07PM +0100, Vojtech Pavlik wrote:
> > On Fri, Nov 04, 2005 at 01:35:41PM +0100, Adrian Bunk wrote:
> > > This patch contains the following possible cleanups:
> > > - make needlessly glbal code static
> >
> > Agreed.
> >
> > > - gameport/gameport: #if 0 the unused global function gameport_reconnect
> >
> > That one should be an EXPORT_SYMBOL() API. If the export is missing,
> > then that's the bug that needs to be fixed.
> >...
>
> There isn't even a header providing a function prototype which is quite
> strange for a part of an API.
It's a planned API (a mirror of what the serio abstraction does), the
drivers don't use it yet.
--
Vojtech Pavlik
SuSE Labs, SuSE CR
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] drivers/input/: possible cleanups
2005-11-04 13:12 ` Vojtech Pavlik
@ 2005-11-05 15:09 ` Adrian Bunk
2005-11-05 20:20 ` Vojtech Pavlik
0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2005-11-05 15:09 UTC (permalink / raw)
To: Vojtech Pavlik; +Cc: linux-input, linux-kernel, linux-joystick
On Fri, Nov 04, 2005 at 02:12:28PM +0100, Vojtech Pavlik wrote:
> On Fri, Nov 04, 2005 at 01:57:42PM +0100, Adrian Bunk wrote:
>
> > On Fri, Nov 04, 2005 at 01:42:07PM +0100, Vojtech Pavlik wrote:
> > > On Fri, Nov 04, 2005 at 01:35:41PM +0100, Adrian Bunk wrote:
> > > > This patch contains the following possible cleanups:
> > > > - make needlessly glbal code static
> > >
> > > Agreed.
> > >
> > > > - gameport/gameport: #if 0 the unused global function gameport_reconnect
> > >
> > > That one should be an EXPORT_SYMBOL() API. If the export is missing,
> > > then that's the bug that needs to be fixed.
> > >...
> >
> > There isn't even a header providing a function prototype which is quite
> > strange for a part of an API.
>
> It's a planned API (a mirror of what the serio abstraction does), the
> drivers don't use it yet.
Can you either apply my patch to #if 0 it, or (if usage is planned very
soon) add a function prototype to a header file?
In both cases, we get rid of a warning both by sparse and with the gcc
-Wmissing-prototypes flag.
> Vojtech Pavlik
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] drivers/input/: possible cleanups
2005-11-05 15:09 ` Adrian Bunk
@ 2005-11-05 20:20 ` Vojtech Pavlik
0 siblings, 0 replies; 6+ messages in thread
From: Vojtech Pavlik @ 2005-11-05 20:20 UTC (permalink / raw)
To: Adrian Bunk; +Cc: linux-input, linux-kernel, linux-joystick
On Sat, Nov 05, 2005 at 04:09:59PM +0100, Adrian Bunk wrote:
> On Fri, Nov 04, 2005 at 02:12:28PM +0100, Vojtech Pavlik wrote:
> > On Fri, Nov 04, 2005 at 01:57:42PM +0100, Adrian Bunk wrote:
> >
> > > On Fri, Nov 04, 2005 at 01:42:07PM +0100, Vojtech Pavlik wrote:
> > > > On Fri, Nov 04, 2005 at 01:35:41PM +0100, Adrian Bunk wrote:
> > > > > This patch contains the following possible cleanups:
> > > > > - make needlessly glbal code static
> > > >
> > > > Agreed.
> > > >
> > > > > - gameport/gameport: #if 0 the unused global function gameport_reconnect
> > > >
> > > > That one should be an EXPORT_SYMBOL() API. If the export is missing,
> > > > then that's the bug that needs to be fixed.
> > > >...
> > >
> > > There isn't even a header providing a function prototype which is quite
> > > strange for a part of an API.
> >
> > It's a planned API (a mirror of what the serio abstraction does), the
> > drivers don't use it yet.
>
> Can you either apply my patch to #if 0 it, or (if usage is planned very
> soon) add a function prototype to a header file?
I'll add the prototype.
>
> In both cases, we get rid of a warning both by sparse and with the gcc
> -Wmissing-prototypes flag.
>
> > Vojtech Pavlik
>
> cu
> Adrian
>
> --
>
> "Is there not promise of rain?" Ling Tan asked suddenly out
> of the darkness. There had been need of rain for many days.
> "Only a promise," Lao Er said.
> Pearl S. Buck - Dragon Seed
>
>
--
Vojtech Pavlik
SuSE Labs, SuSE CR
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-11-05 20:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-04 12:35 [2.6 patch] drivers/input/: possible cleanups Adrian Bunk
2005-11-04 12:42 ` Vojtech Pavlik
2005-11-04 12:57 ` Adrian Bunk
2005-11-04 13:12 ` Vojtech Pavlik
2005-11-05 15:09 ` Adrian Bunk
2005-11-05 20:20 ` Vojtech Pavlik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox