* [-mm patch] connector.c: make notify_lock static
@ 2005-01-31 12:41 Adrian Bunk
2005-01-31 13:06 ` Evgeniy Polyakov
2005-01-31 15:00 ` Dmitry Torokhov
0 siblings, 2 replies; 4+ messages in thread
From: Adrian Bunk @ 2005-01-31 12:41 UTC (permalink / raw)
To: Evgeniy Polyakov; +Cc: Greg Kroah-Hartman, linux-kernel
notify_lock isn't a good name for a global lock.
But since it's not used outside of the file, it can be made static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.11-rc2-mm2-full/drivers/connector/connector.c.old 2005-01-31 13:09:14.000000000 +0100
+++ linux-2.6.11-rc2-mm2-full/drivers/connector/connector.c 2005-01-31 13:09:28.000000000 +0100
@@ -41,7 +41,7 @@
module_param(cn_idx, uint, 0);
module_param(cn_val, uint, 0);
-spinlock_t notify_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t notify_lock = SPIN_LOCK_UNLOCKED;
static LIST_HEAD(notify_list);
static struct cn_dev cdev;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [-mm patch] connector.c: make notify_lock static
2005-01-31 12:41 [-mm patch] connector.c: make notify_lock static Adrian Bunk
@ 2005-01-31 13:06 ` Evgeniy Polyakov
2005-01-31 15:00 ` Dmitry Torokhov
1 sibling, 0 replies; 4+ messages in thread
From: Evgeniy Polyakov @ 2005-01-31 13:06 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Greg Kroah-Hartman, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 863 bytes --]
On Mon, 2005-01-31 at 13:41 +0100, Adrian Bunk wrote:
> notify_lock isn't a good name for a global lock.
> But since it's not used outside of the file, it can be made static.
You are right, Adrian, thank you.
Greg, please push it upstream.
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
> --- linux-2.6.11-rc2-mm2-full/drivers/connector/connector.c.old 2005-01-31 13:09:14.000000000 +0100
> +++ linux-2.6.11-rc2-mm2-full/drivers/connector/connector.c 2005-01-31 13:09:28.000000000 +0100
> @@ -41,7 +41,7 @@
> module_param(cn_idx, uint, 0);
> module_param(cn_val, uint, 0);
>
> -spinlock_t notify_lock = SPIN_LOCK_UNLOCKED;
> +static spinlock_t notify_lock = SPIN_LOCK_UNLOCKED;
> static LIST_HEAD(notify_list);
>
> static struct cn_dev cdev;
--
Evgeniy Polyakov
Crash is better than data corruption -- Arthur Grabowski
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [-mm patch] connector.c: make notify_lock static
2005-01-31 12:41 [-mm patch] connector.c: make notify_lock static Adrian Bunk
2005-01-31 13:06 ` Evgeniy Polyakov
@ 2005-01-31 15:00 ` Dmitry Torokhov
2005-01-31 16:07 ` Evgeniy Polyakov
1 sibling, 1 reply; 4+ messages in thread
From: Dmitry Torokhov @ 2005-01-31 15:00 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Evgeniy Polyakov, Greg Kroah-Hartman, linux-kernel
On Mon, 31 Jan 2005 13:41:19 +0100, Adrian Bunk <bunk@stusta.de> wrote:
> notify_lock isn't a good name for a global lock.
> But since it's not used outside of the file, it can be made static.
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
>
> --- linux-2.6.11-rc2-mm2-full/drivers/connector/connector.c.old 2005-01-31 13:09:14.000000000 +0100
> +++ linux-2.6.11-rc2-mm2-full/drivers/connector/connector.c 2005-01-31 13:09:28.000000000 +0100
> @@ -41,7 +41,7 @@
> module_param(cn_idx, uint, 0);
> module_param(cn_val, uint, 0);
>
> -spinlock_t notify_lock = SPIN_LOCK_UNLOCKED;
> +static spinlock_t notify_lock = SPIN_LOCK_UNLOCKED;
> static LIST_HEAD(notify_list);
>
> static struct cn_dev cdev;
>
Isn't this supposed to be "static DEFINE_SPINLOCK(notify_lock);" nowadays?
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [-mm patch] connector.c: make notify_lock static
2005-01-31 15:00 ` Dmitry Torokhov
@ 2005-01-31 16:07 ` Evgeniy Polyakov
0 siblings, 0 replies; 4+ messages in thread
From: Evgeniy Polyakov @ 2005-01-31 16:07 UTC (permalink / raw)
To: dtor_core; +Cc: dmitry.torokhov, Adrian Bunk, Greg Kroah-Hartman, linux-kernel
On Mon, 31 Jan 2005 10:00:51 -0500
Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> On Mon, 31 Jan 2005 13:41:19 +0100, Adrian Bunk <bunk@stusta.de> wrote:
> > notify_lock isn't a good name for a global lock.
> > But since it's not used outside of the file, it can be made static.
> >
> > Signed-off-by: Adrian Bunk <bunk@stusta.de>
> >
> > --- linux-2.6.11-rc2-mm2-full/drivers/connector/connector.c.old 2005-01-31 13:09:14.000000000 +0100
> > +++ linux-2.6.11-rc2-mm2-full/drivers/connector/connector.c 2005-01-31 13:09:28.000000000 +0100
> > @@ -41,7 +41,7 @@
> > module_param(cn_idx, uint, 0);
> > module_param(cn_val, uint, 0);
> >
> > -spinlock_t notify_lock = SPIN_LOCK_UNLOCKED;
> > +static spinlock_t notify_lock = SPIN_LOCK_UNLOCKED;
> > static LIST_HEAD(notify_list);
> >
> > static struct cn_dev cdev;
> >
>
> Isn't this supposed to be "static DEFINE_SPINLOCK(notify_lock);" nowadays?
That's not a problem, I will cook up a patch and send it through Greg.
Thank you.
> --
> Dmitry
Evgeniy Polyakov
Only failure makes us experts. -- Theo de Raadt
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-01-31 15:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-31 12:41 [-mm patch] connector.c: make notify_lock static Adrian Bunk
2005-01-31 13:06 ` Evgeniy Polyakov
2005-01-31 15:00 ` Dmitry Torokhov
2005-01-31 16:07 ` Evgeniy Polyakov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox