From: Michael Ellerman <michael@ellerman.id.au>
To: Andrew Morton <akpm@osdl.org>
Cc: <linux-kernel@vger.kernel.org>, <gud@eth.net>, <mingo@elte.hu>,
<arjan@linux.intel.com>, <milindchoudhary@gmail.com>
Subject: [PATCH] Document SPIN_LOCK_UNLOCKED/RW_LOCK_UNLOCKED deprecation
Date: Wed, 18 Apr 2007 11:40:55 +1000 [thread overview]
Message-ID: <20070418014118.3F073DDE9F@ozlabs.org> (raw)
Apparently it's not cool anymore to use SPIN/RW_LOCK_UNLOCKED.
There's some mention of this in Documentation/spinlocks.txt, but that
only talks about dynamic initialisation.
A comment in the code mentioning the preferred usage would be good IMHO.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
include/linux/spinlock_types.h | 5 +++++
1 file changed, 5 insertions(+)
Index: powerpc/include/linux/spinlock_types.h
===================================================================
--- powerpc.orig/include/linux/spinlock_types.h
+++ powerpc/include/linux/spinlock_types.h
@@ -85,6 +85,11 @@ typedef struct {
RW_DEP_MAP_INIT(lockname) }
#endif
+/*
+ * SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED are deprecated.
+ * Please use DEFINE_SPINLOCK()/DEFINE_RWLOCK() or
+ * __SPIN_LOCK_UNLOCKED()/__RW_LOCK_UNLOCKED() as appropriate.
+ */
#define SPIN_LOCK_UNLOCKED __SPIN_LOCK_UNLOCKED(old_style_spin_init)
#define RW_LOCK_UNLOCKED __RW_LOCK_UNLOCKED(old_style_rw_init)
next reply other threads:[~2007-04-18 1:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-18 1:40 Michael Ellerman [this message]
2007-04-18 6:13 ` Ingo Molnar
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=20070418014118.3F073DDE9F@ozlabs.org \
--to=michael@ellerman.id.au \
--cc=akpm@osdl.org \
--cc=arjan@linux.intel.com \
--cc=gud@eth.net \
--cc=linux-kernel@vger.kernel.org \
--cc=milindchoudhary@gmail.com \
--cc=mingo@elte.hu \
/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
Powered by JetHome