* [KJ] [PATCH] unified spinlock initialization
2005-01-20 15:36 [KJ] [PATCH] unified spinlock initialization Matthew Wilcox
@ 2005-01-20 15:36 ` Amit Gud
2005-01-20 15:38 ` Amit Gud
` (13 subsequent siblings)
14 siblings, 0 replies; 22+ messages in thread
From: Amit Gud @ 2005-01-20 15:36 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1572 bytes --]
Unify the spinlock initialization as far as possible.
Do consider applying.
Signed-off-by: Amit Gud <gud@eth.net>
--- vanilla-2.6.10/arch/um/drivers/net_kern.c 2005-01-19 11:19:23.000000000 +0530
+++ linux-2.6.10/arch/um/drivers/net_kern.c 2005-01-20 20:28:31.000000000 +0530
@@ -30,7 +30,7 @@
#include "irq_user.h"
#include "irq_kern.h"
-static spinlock_t opened_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t opened_lock;
LIST_HEAD(opened);
static int uml_net_rx(struct net_device *dev)
@@ -286,7 +286,7 @@ void uml_net_user_timer_expire(unsigned
#endif
}
-static spinlock_t devices_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t devices_lock;
static struct list_head devices = LIST_HEAD_INIT(devices);
static int eth_configure(int n, void *init, char *mac,
@@ -371,7 +371,6 @@ static int eth_configure(int n, void *in
save = lp->user[0];
*lp = ((struct uml_net_private)
{ .list = LIST_HEAD_INIT(lp->list),
- .lock = SPIN_LOCK_UNLOCKED,
.dev = dev,
.fd = -1,
.mac = { 0xfe, 0xfd, 0x0, 0x0, 0x0, 0x0},
@@ -387,6 +386,7 @@ static int eth_configure(int n, void *in
.set_mtu = transport->user->set_mtu,
.user = { save } });
+ spin_lock_init(&lp->lock);
init_timer(&lp->tl);
lp->tl.function = uml_net_user_timer_expire;
if (lp->have_mac)
@@ -679,6 +679,8 @@ static int uml_net_init(void)
struct in_device *ip;
struct in_ifaddr *in;
+ spin_lock_init(&opened_lock);
+ spin_lock_init(&devices_lock);
mconsole_register_dev(&net_mc);
register_inetaddr_notifier(¨_inetaddr_notifier);
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 22+ messages in thread* [KJ] [PATCH] unified spinlock initialization
2005-01-20 15:36 [KJ] [PATCH] unified spinlock initialization Matthew Wilcox
2005-01-20 15:36 ` Amit Gud
@ 2005-01-20 15:38 ` Amit Gud
2005-01-20 15:39 ` Amit Gud
` (12 subsequent siblings)
14 siblings, 0 replies; 22+ messages in thread
From: Amit Gud @ 2005-01-20 15:38 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 867 bytes --]
Unify the spinlock initialization as far as possible.
Do consider applying.
Signed-off-by: Amit Gud <gud@eth.net>
--- vanilla-2.6.10/arch/um/drivers/mconsole_kern.c 2005-01-19 11:19:23.000000000 +0530
+++ linux-2.6.10/arch/um/drivers/mconsole_kern.c 2005-01-20 20:16:58.000000000 +0530
@@ -454,12 +454,14 @@ void mconsole_sysrq(struct mc_request *r
* active.
*/
static char *notify_socket = NULL;
+static spinlock_t notify_spinlock;
int mconsole_init(void)
{
int err, sock;
char file[256];
+ spin_lock_init(¬ify_spinlock);
if(umid_file_name("mconsole", file, sizeof(file))) return(-1);
snprintf(mconsole_socket_name, sizeof(file), "%s", file);
@@ -535,8 +537,6 @@ static int create_proc_mconsole(void)
return(0);
}
-static spinlock_t notify_spinlock = SPIN_LOCK_UNLOCKED;
-
void lock_notify(void)
{
spin_lock(¬ify_spinlock);
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 22+ messages in thread* [KJ] [PATCH] unified spinlock initialization
2005-01-20 15:36 [KJ] [PATCH] unified spinlock initialization Matthew Wilcox
2005-01-20 15:36 ` Amit Gud
2005-01-20 15:38 ` Amit Gud
@ 2005-01-20 15:39 ` Amit Gud
2005-01-20 15:40 ` Amit Gud
` (11 subsequent siblings)
14 siblings, 0 replies; 22+ messages in thread
From: Amit Gud @ 2005-01-20 15:39 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 692 bytes --]
Unify the spinlock initialization as far as possible.
Do consider applying.
Signed-off-by: Amit Gud <gud@eth.net>
--- vanilla-2.6.10/arch/um/drivers/port_kern.c 2005-01-19 11:19:23.000000000 +0530
+++ linux-2.6.10/arch/um/drivers/port_kern.c 2005-01-20 20:18:37.000000000 +0530
@@ -185,11 +185,11 @@ void *port_data(int port_num)
.has_connection = 0,
.sem = __SEMAPHORE_INITIALIZER(port->sem,
0),
- .lock = SPIN_LOCK_UNLOCKED,
.port = port_num,
.fd = fd,
.pending = LIST_HEAD_INIT(port->pending),
.connections = LIST_HEAD_INIT(port->connections) });
+ spin_lock_init(&port->lock);
list_add(&port->list, &ports);
found:
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 22+ messages in thread* [KJ] [PATCH] unified spinlock initialization
2005-01-20 15:36 [KJ] [PATCH] unified spinlock initialization Matthew Wilcox
` (2 preceding siblings ...)
2005-01-20 15:39 ` Amit Gud
@ 2005-01-20 15:40 ` Amit Gud
2005-01-24 15:28 ` [KJ] [PATCH] unified spinlock initialization drivers/acpi/ec.c Amit Gud
` (10 subsequent siblings)
14 siblings, 0 replies; 22+ messages in thread
From: Amit Gud @ 2005-01-20 15:40 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 740 bytes --]
Unify the spinlock initialization as far as possible.
Do consider applying.
Signed-off-by: Amit Gud <gud@eth.net>
--- vanilla-2.6.10/arch/um/drivers/ubd_kern.c 2005-01-20 20:08:30.000000000 +0530
+++ linux-2.6.10/arch/um/drivers/ubd_kern.c 2005-01-20 20:03:08.000000000 +0530
@@ -54,8 +54,8 @@
#include "mem.h"
#include "mem_kern.h"
-static spinlock_t ubd_io_lock = SPIN_LOCK_UNLOCKED;
-static spinlock_t ubd_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t ubd_io_lock;
+static spinlock_t ubd_lock;
static void (*do_ubd)(void);
@@ -744,6 +744,9 @@ int ubd_init(void)
{
int i;
+ spin_lock_init(&ubd_lock);
+ spin_lock_init(&ubd_io_lock);
+
devfs_mk_dir("ubd");
if (register_blkdev(MAJOR_NR, "ubd"))
return -1;
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 22+ messages in thread* [KJ] [PATCH] unified spinlock initialization drivers/acpi/ec.c
2005-01-20 15:36 [KJ] [PATCH] unified spinlock initialization Matthew Wilcox
` (3 preceding siblings ...)
2005-01-20 15:40 ` Amit Gud
@ 2005-01-24 15:28 ` Amit Gud
2005-01-24 15:30 ` [KJ] [PATCH] unified spinlock initialization Amit Gud
` (9 subsequent siblings)
14 siblings, 0 replies; 22+ messages in thread
From: Amit Gud @ 2005-01-24 15:28 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 895 bytes --]
Unify the spinlock initialization as far as possible.
Do consider applying.
Signed-off-by: Amit Gud <gud@eth.net>
--- vanilla-2.6.10/drivers/acpi/ec.c 2005-01-19 11:19:24.000000000 +0530
+++ linux-2.6.10/drivers/acpi/ec.c 2005-01-24 15:01:45.000000000 +0530
@@ -599,7 +599,7 @@ acpi_ec_add (
ec->handle = device->handle;
ec->uid = -1;
- ec->lock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&ec->lock);
strcpy(acpi_device_name(device), ACPI_EC_DEVICE_NAME);
strcpy(acpi_device_class(device), ACPI_EC_CLASS);
acpi_driver_data(device) = ec;
@@ -813,7 +813,7 @@ acpi_ec_ecdt_probe (void)
ec_ecdt->status_addr = ecdt_ptr->ec_control;
ec_ecdt->data_addr = ecdt_ptr->ec_data;
ec_ecdt->gpe_bit = ecdt_ptr->gpe_bit;
- ec_ecdt->lock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&ec_ecdt->lock);
/* use the GL just to be safe */
ec_ecdt->global_lock = TRUE;
ec_ecdt->uid = ecdt_ptr->uid;
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 22+ messages in thread* [KJ] [PATCH] unified spinlock initialization
2005-01-20 15:36 [KJ] [PATCH] unified spinlock initialization Matthew Wilcox
` (4 preceding siblings ...)
2005-01-24 15:28 ` [KJ] [PATCH] unified spinlock initialization drivers/acpi/ec.c Amit Gud
@ 2005-01-24 15:30 ` Amit Gud
2005-01-24 15:41 ` [KJ] [PATCH] unified spinlock initialization drivers/block/DAC960.c Amit Gud
` (8 subsequent siblings)
14 siblings, 0 replies; 22+ messages in thread
From: Amit Gud @ 2005-01-24 15:30 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 547 bytes --]
Unify the spinlock initialization as far as possible.
Do consider applying.
Signed-off-by: Amit Gud <gud@eth.net>
--- vanilla-2.6.10/drivers/block/cciss_scsi.c 2005-01-19 11:19:25.000000000 +0530
+++ linux-2.6.10/drivers/block/cciss_scsi.c 2005-01-24 19:33:24.000000000 +0530
@@ -534,7 +534,7 @@ cciss_scsi_setup(int cntl_num)
if (shba == NULL)
return;
shba->scsi_host = NULL;
- shba->lock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&shba->lock);
shba->registered = 0;
if (scsi_cmd_stack_setup(cntl_num, shba) != 0) {
kfree(shba);
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 22+ messages in thread* [KJ] [PATCH] unified spinlock initialization drivers/block/DAC960.c
2005-01-20 15:36 [KJ] [PATCH] unified spinlock initialization Matthew Wilcox
` (5 preceding siblings ...)
2005-01-24 15:30 ` [KJ] [PATCH] unified spinlock initialization Amit Gud
@ 2005-01-24 15:41 ` Amit Gud
2005-01-24 15:42 ` [KJ] [PATCH] unified spinlock initialization Amit Gud
` (7 subsequent siblings)
14 siblings, 0 replies; 22+ messages in thread
From: Amit Gud @ 2005-01-24 15:41 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 635 bytes --]
Unify the spinlock initialization as far as possible.
Do consider applying.
Signed-off-by: Amit Gud <gud@eth.net>
--- vanilla-2.6.10/drivers/block/DAC960.c 2005-01-19 11:19:25.000000000 +0530
+++ linux-2.6.10/drivers/block/DAC960.c 2005-01-24 19:31:13.000000000 +0530
@@ -2738,7 +2738,7 @@ DAC960_DetectController(struct pci_dev *
}
init_waitqueue_head(&Controller->CommandWaitQueue);
init_waitqueue_head(&Controller->HealthStatusWaitQueue);
- Controller->queue_lock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&Controller->queue_lock);
DAC960_AnnounceDriver(Controller);
/*
Map the Controller Register Window.
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 22+ messages in thread* [KJ] [PATCH] unified spinlock initialization
2005-01-20 15:36 [KJ] [PATCH] unified spinlock initialization Matthew Wilcox
` (6 preceding siblings ...)
2005-01-24 15:41 ` [KJ] [PATCH] unified spinlock initialization drivers/block/DAC960.c Amit Gud
@ 2005-01-24 15:42 ` Amit Gud
2005-01-24 15:48 ` Amit Gud
` (6 subsequent siblings)
14 siblings, 0 replies; 22+ messages in thread
From: Amit Gud @ 2005-01-24 15:42 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 722 bytes --]
Unify the spinlock initialization as far as possible.
Do consider applying.
Signed-off-by: Amit Gud <gud@eth.net>
--- vanilla-2.6.10/drivers/char/drm/drm_auth.h 2004-10-19 03:25:07.000000000 +0530
+++ linux-2.6.10/drivers/char/drm/drm_auth.h 2005-01-24 20:07:39.000000000 +0530
@@ -174,11 +174,12 @@ int DRM(getmagic)(struct inode *inode, s
unsigned int cmd, unsigned long arg)
{
static drm_magic_t sequence = 0;
- static spinlock_t lock = SPIN_LOCK_UNLOCKED;
+ static spinlock_t lock;
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->dev;
drm_auth_t auth;
-
+
+ spin_lock_init(&lock);
/* Find unique magic */
if (priv->magic) {
auth.magic = priv->magic;
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 22+ messages in thread* [KJ] [PATCH] unified spinlock initialization
2005-01-20 15:36 [KJ] [PATCH] unified spinlock initialization Matthew Wilcox
` (7 preceding siblings ...)
2005-01-24 15:42 ` [KJ] [PATCH] unified spinlock initialization Amit Gud
@ 2005-01-24 15:48 ` Amit Gud
2005-01-24 16:11 ` Randy.Dunlap
` (5 subsequent siblings)
14 siblings, 0 replies; 22+ messages in thread
From: Amit Gud @ 2005-01-24 15:48 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 601 bytes --]
Unify the spinlock initialization as far as possible.
Do consider applying.
Signed-off-by: Amit Gud <gud@eth.net>
--- vanilla-2.6.10/drivers/char/drm/drm_drv.h 2005-01-19 11:19:25.000000000 +0530
+++ linux-2.6.10/drivers/char/drm/drm_drv.h 2005-01-24 20:09:35.000000000 +0530
@@ -447,7 +447,7 @@ static int DRM(probe)(struct pci_dev *pd
dev = &(DRM(device)[DRM(numdevs)]);
memset( (void *)dev, 0, sizeof(*dev) );
- dev->count_lock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&dev->count_lock);
init_timer( &dev->timer );
sema_init( &dev->struct_sem, 1 );
sema_init( &dev->ctxlist_sem, 1 );
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 22+ messages in thread* Re: [KJ] [PATCH] unified spinlock initialization
2005-01-20 15:36 [KJ] [PATCH] unified spinlock initialization Matthew Wilcox
` (8 preceding siblings ...)
2005-01-24 15:48 ` Amit Gud
@ 2005-01-24 16:11 ` Randy.Dunlap
2005-01-24 16:25 ` Christophe Lucas
` (4 subsequent siblings)
14 siblings, 0 replies; 22+ messages in thread
From: Randy.Dunlap @ 2005-01-24 16:11 UTC (permalink / raw)
To: kernel-janitors
Christophe Lucas wrote:
> In: drivers/misc/ibmasm/module.c
>
> Signed-off-by: Christophe Lucas <c.lucas@ifrance.com>
>
>
> ------------------------------------------------------------------------
>
> diff -urbNB linux-2.6.10-vanilla/drivers/misc/ibmasm/module.c linux-2.6.10/drivers/misc/ibmasm/module.c
> --- linux-2.6.10-vanilla/drivers/misc/ibmasm/module.c 2005-01-24 17:08:09.000000000 +0100
> +++ linux-2.6.10/drivers/misc/ibmasm/module.c 2005-01-24 17:18:31.000000000 +0100
> @@ -107,7 +107,7 @@
> goto error_remote_queue;
> }
>
> - sp->lock = SPIN_LOCK_UNLOCKED;
> + spin_lock_init( &sp->lock );
Please lose those spaces... that's not kernel coding style.
--
~Randy
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 22+ messages in thread* [KJ] [PATCH] unified spinlock initialization
2005-01-20 15:36 [KJ] [PATCH] unified spinlock initialization Matthew Wilcox
` (9 preceding siblings ...)
2005-01-24 16:11 ` Randy.Dunlap
@ 2005-01-24 16:25 ` Christophe Lucas
2005-01-24 16:41 ` Domen Puncer
` (3 subsequent siblings)
14 siblings, 0 replies; 22+ messages in thread
From: Christophe Lucas @ 2005-01-24 16:25 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 182 bytes --]
--===============92655985430799481==
Content-Disposition: inline
Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature"; boundary="Yylu36WmvOXNoKYn"
[-- Attachment #2.1: Type: text/plain, Size: 108 bytes --]
In: drivers/misc/ibmasm/module.c
Signed-off-by: Christophe Lucas <c.lucas@ifrance.com>
--
Christophe
[-- Attachment #2.2: ibmmasm-module-unified-spinlock.patch --]
[-- Type: text/plain, Size: 539 bytes --]
diff -urbNB linux-2.6.10-vanilla/drivers/misc/ibmasm/module.c linux-2.6.10/drivers/misc/ibmasm/module.c
--- linux-2.6.10-vanilla/drivers/misc/ibmasm/module.c 2005-01-24 17:08:09.000000000 +0100
+++ linux-2.6.10/drivers/misc/ibmasm/module.c 2005-01-24 17:18:31.000000000 +0100
@@ -107,7 +107,7 @@
goto error_remote_queue;
}
- sp->lock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init( &sp->lock );
INIT_LIST_HEAD(&sp->command_queue);
result = request_irq(sp->irq, ibmasm_interrupt_handler, SA_SHIRQ, sp->devname, (void*)sp);
[-- Attachment #3: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread* Re: [KJ] [PATCH] unified spinlock initialization
2005-01-20 15:36 [KJ] [PATCH] unified spinlock initialization Matthew Wilcox
` (10 preceding siblings ...)
2005-01-24 16:25 ` Christophe Lucas
@ 2005-01-24 16:41 ` Domen Puncer
2005-01-25 7:03 ` Christophe Lucas
` (2 subsequent siblings)
14 siblings, 0 replies; 22+ messages in thread
From: Domen Puncer @ 2005-01-24 16:41 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1147 bytes --]
Already done in 2.6.11-rc2, look below for some comments.
On 24/01/05 21:00 +0530, Amit Gud wrote:
> Unify the spinlock initialization as far as possible.
>
> Do consider applying.
>
> Signed-off-by: Amit Gud <gud@eth.net>
>
> --- vanilla-2.6.10/drivers/char/drm/drm_auth.h 2004-10-19 03:25:07.000000000 +0530
> +++ linux-2.6.10/drivers/char/drm/drm_auth.h 2005-01-24 20:07:39.000000000 +0530
> @@ -174,11 +174,12 @@ int DRM(getmagic)(struct inode *inode, s
> unsigned int cmd, unsigned long arg)
> {
> static drm_magic_t sequence = 0;
> - static spinlock_t lock = SPIN_LOCK_UNLOCKED;
> + static spinlock_t lock;
> drm_file_t *priv = filp->private_data;
> drm_device_t *dev = priv->dev;
> drm_auth_t auth;
> -
> +
You added whitespace.
> + spin_lock_init(&lock);
This changes behaviour, because of static lock wasn't initialized on
every function run, now it is, which makes it rather useless.
Correct way to do this seems to be what is already in 2.6.11-rc2 in
drm_auth.c:
static drm_magic_t sequence = 0;
static DEFINE_SPINLOCK(lock);
drm_file_t *priv = filp->private_data;
Domen
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 22+ messages in thread* Re: [KJ] [PATCH] unified spinlock initialization
2005-01-20 15:36 [KJ] [PATCH] unified spinlock initialization Matthew Wilcox
` (11 preceding siblings ...)
2005-01-24 16:41 ` Domen Puncer
@ 2005-01-25 7:03 ` Christophe Lucas
2005-01-25 7:07 ` [KJ] [PATCH] Unified " Christophe Lucas
2005-01-25 11:33 ` Amit Gud
14 siblings, 0 replies; 22+ messages in thread
From: Christophe Lucas @ 2005-01-25 7:03 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 921 bytes --]
Randy.Dunlap (rddunlap@osdl.org) wrote:
> Christophe Lucas wrote:
> >In: drivers/misc/ibmasm/module.c
> >
> >Signed-off-by: Christophe Lucas <c.lucas@ifrance.com>
> >
> >
> >------------------------------------------------------------------------
> >
> >diff -urbNB linux-2.6.10-vanilla/drivers/misc/ibmasm/module.c
> >linux-2.6.10/drivers/misc/ibmasm/module.c
> >--- linux-2.6.10-vanilla/drivers/misc/ibmasm/module.c 2005-01-24
> >17:08:09.000000000 +0100
> >+++ linux-2.6.10/drivers/misc/ibmasm/module.c 2005-01-24
> >17:18:31.000000000 +0100
> >@@ -107,7 +107,7 @@
> > goto error_remote_queue;
> > }
> >
> >- sp->lock = SPIN_LOCK_UNLOCKED;
> >+ spin_lock_init( &sp->lock );
>
> Please lose those spaces... that's not kernel coding style.
Hi,
Thanks Randy,
Here is the corrected patch.
In: drivers/misc/ibmasm/module.c
Signed-off-by: Christophe Lucas <c.lucas@ifrance.com>
Have a good day :)
--
Christophe
[-- Attachment #2: ibmmasm-module-unified-spinlock.patch --]
[-- Type: text/plain, Size: 525 bytes --]
diff -urbNB linux-2.6.10-vanilla/drivers/misc/ibmasm/module.c linux-2.6.10/drivers/misc/ibmasm/module.c
--- linux-2.6.10-vanilla/drivers/misc/ibmasm/module.c 2005-01-24 17:08:09.000000000 +0100
+++ linux-2.6.10/drivers/misc/ibmasm/module.c 2005-01-24 17:18:31.000000000 +0100
@@ -107,7 +107,7 @@
goto error_remote_queue;
}
- sp->lock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&sp->lock);
INIT_LIST_HEAD(&sp->command_queue);
result = request_irq(sp->irq, ibmasm_interrupt_handler, SA_SHIRQ, sp->devname, (void*)sp);
[-- Attachment #3: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 22+ messages in thread* [KJ] [PATCH] Unified spinlock initialization
2005-01-20 15:36 [KJ] [PATCH] unified spinlock initialization Matthew Wilcox
` (12 preceding siblings ...)
2005-01-25 7:03 ` Christophe Lucas
@ 2005-01-25 7:07 ` Christophe Lucas
2005-01-25 11:33 ` Amit Gud
14 siblings, 0 replies; 22+ messages in thread
From: Christophe Lucas @ 2005-01-25 7:07 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 103 bytes --]
Unified spinlock initialization.
Signed-off-by: Christophe Lucas <c.lucas@ifrance.com>
--
Christophe
[-- Attachment #2: skystar2-unified-spinlock.patch --]
[-- Type: text/plain, Size: 443 bytes --]
diff -urB linux-2.6.10-vanilla/drivers/media/dvb/b2c2/skystar2.c linux-2.6.10/drivers/media/dvb/b2c2/skystar2.c
--- linux-2.6.10-vanilla/drivers/media/dvb/b2c2/skystar2.c 2005-01-24 17:07:56.000000000 +0100
+++ linux-2.6.10/drivers/media/dvb/b2c2/skystar2.c 2005-01-24 20:40:35.000000000 +0100
@@ -1979,7 +1979,7 @@
ctrl_enable_mac(adapter, 1);
}
- adapter->lock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&adapter->lock);
return 0;
}
[-- Attachment #3: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 22+ messages in thread* Re: [KJ] [PATCH] Unified spinlock initialization
2005-01-20 15:36 [KJ] [PATCH] unified spinlock initialization Matthew Wilcox
` (13 preceding siblings ...)
2005-01-25 7:07 ` [KJ] [PATCH] Unified " Christophe Lucas
@ 2005-01-25 11:33 ` Amit Gud
14 siblings, 0 replies; 22+ messages in thread
From: Amit Gud @ 2005-01-25 11:33 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 169 bytes --]
Fixed in 2.6.11-rc2
On Tue, 2005-01-25 at 12:37, Christophe Lucas wrote:
> Unified spinlock initialization.
>
> Signed-off-by: Christophe Lucas <c.lucas@ifrance.com>
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 22+ messages in thread