public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Milind Arun Choudhary <milindchoudhary@gmail.com>
To: kernel-janitors@lists.osdl.org
Cc: kernelnewbies@nl.linux.org, linux-kernel@vger.kernel.org
Subject: [KJ]remove SPIN_LOCK_UNLOCKED
Date: Tue, 10 Apr 2007 23:46:54 +0530	[thread overview]
Message-ID: <20070410181654.GA10525@arun.site> (raw)

"use spin_lock_init instead of SPIN_LOCK_UNLOCKED"


i'm a bit confused with SPIN_LOCK_UNLOCKED removal
 I just did the below mentioned change
but then came to know that  spin_lock_init is defined as

# define spin_lock_init(lock)                                   \
        do { *(lock) = SPIN_LOCK_UNLOCKED; } while (0)

so what difference does it make..
eventually replacing SPIN_LOCK_UNLOCKED with itself

or is it just that this one [SPIN_LOCK_UNLOCKED] also needs 
to be replaced with __SPIN_LOCK_UNLOCKED?

after thought with CONFIG_DEBUG_SPINLOCK does make a diff


let me know if this is fine ..


 aerdrv.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pcie/aer/aerdrv.c b/drivers/pci/pcie/aer/aerdrv.c
index db6ad8e..6846fb4 100644
--- a/drivers/pci/pcie/aer/aerdrv.c
+++ b/drivers/pci/pcie/aer/aerdrv.c
@@ -157,7 +157,7 @@ static struct aer_rpc* aer_alloc_rpc(struct pcie_device *dev)
 	 * Initialize Root lock access, e_lock, to Root Error Status Reg,
 	 * Root Error ID Reg, and Root error producer/consumer index.
 	 */
-	rpc->e_lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&rpc->e_lock);
 
 	rpc->rpd = dev;
 	INIT_WORK(&rpc->dpc_handler, aer_isr);


-- 
Milind Arun Choudhary

             reply	other threads:[~2007-04-10 18:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-10 18:16 Milind Arun Choudhary [this message]
2007-04-10 20:50 ` [KJ]remove SPIN_LOCK_UNLOCKED Jan Engelhardt
2007-04-10 21:13   ` Roland Dreier
2007-04-10 21:25   ` Robert P. J. Day
2007-04-10 21:28     ` Jan Engelhardt
2007-04-10 21:42       ` Roland Dreier
2007-04-10 21:45         ` Robert P. J. Day
2007-04-10 21:58           ` Roland Dreier
2007-04-10 22:08           ` [KJ] remove SPIN_LOCK_UNLOCKED Matthew Wilcox
2007-04-11  4:09             ` Milind Arun Choudhary
2007-04-11  5:47             ` Robert P. J. Day

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=20070410181654.GA10525@arun.site \
    --to=milindchoudhary@gmail.com \
    --cc=kernel-janitors@lists.osdl.org \
    --cc=kernelnewbies@nl.linux.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox