From: Domen Puncer <domen@coderock.org>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] [PATCH] unified spinlock initialization
Date: Mon, 24 Jan 2005 16:41:24 +0000 [thread overview]
Message-ID: <20050124164124.GA4462@nd47.coderock.org> (raw)
In-Reply-To: <20050120153602.GI25940@parcelfarce.linux.theplanet.co.uk>
[-- 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
next prev parent reply other threads:[~2005-01-24 16:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
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
2005-01-24 15:28 ` [KJ] [PATCH] unified spinlock initialization drivers/acpi/ec.c Amit Gud
2005-01-24 15:30 ` [KJ] [PATCH] unified spinlock initialization Amit Gud
2005-01-24 15:41 ` [KJ] [PATCH] unified spinlock initialization drivers/block/DAC960.c Amit Gud
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
2005-01-24 16:25 ` Christophe Lucas
2005-01-24 16:41 ` Domen Puncer [this message]
2005-01-25 7:03 ` Christophe Lucas
2005-01-25 7:07 ` [KJ] [PATCH] Unified " Christophe Lucas
2005-01-25 11:33 ` Amit Gud
-- strict thread matches above, loose matches on Subject: below --
2005-01-25 11:34 [PATCH] unified spinlock initialization arch/mips/kernel/irq.c Amit Gud
2005-01-25 11:46 ` [KJ] " Amit Gud
2005-01-25 13:43 ` [KJ] [PATCH] unified spinlock initialization Matthew Wilcox
2005-01-25 13:43 ` [KJ] [PATCH] unified spinlock initialization arch/mips/kernel/irq.c Matthew Wilcox
2005-01-25 11:35 [PATCH] Unified spinlock initialization include/linux/wait.h Amit Gud
2005-01-25 11:47 ` [KJ] " Amit Gud
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050124164124.GA4462@nd47.coderock.org \
--to=domen@coderock.org \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.