public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Thomas Gleixner <tglx@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	peterz@infradead.org, chris@zankel.net, lethal@linux-sh.org,
	tony.luck@intel.com, davem@davemloft.net, dhowells@redhat.com,
	benh@kernel.crashing.org, mattst88@gmail.com,
	heiko.carstens@de.ibm.com, tglx@linutronix.de
Subject: [tip:core/locking] rwsem: Remove redundant asmregparm annotation
Date: Thu, 27 Jan 2011 11:58:07 GMT	[thread overview]
Message-ID: <tip-d123375425d7df4b6081a631fc1203fceafa59b2@git.kernel.org> (raw)
In-Reply-To: <alpine.LFD.2.00.1101262130450.31804@localhost6.localdomain6>

Commit-ID:  d123375425d7df4b6081a631fc1203fceafa59b2
Gitweb:     http://git.kernel.org/tip/d123375425d7df4b6081a631fc1203fceafa59b2
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Wed, 26 Jan 2011 21:32:01 +0100
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 27 Jan 2011 12:30:40 +0100

rwsem: Remove redundant asmregparm annotation

Peter Zijlstra pointed out, that the only user of asmregparm (x86) is
compiling the kernel already with -mregparm=3. So the annotation of
the rwsem functions is redundant. Remove it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: David Miller <davem@davemloft.net>
Cc: Chris Zankel <chris@zankel.net>
LKML-Reference: <alpine.LFD.2.00.1101262130450.31804@localhost6.localdomain6>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 include/linux/rwsem.h |    8 ++++----
 lib/rwsem.c           |   10 ++++------
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h
index f7c957f..a8afe9c 100644
--- a/include/linux/rwsem.h
+++ b/include/linux/rwsem.h
@@ -32,10 +32,10 @@ struct rw_semaphore {
 #endif
 };
 
-extern asmregparm struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem);
-extern asmregparm struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem);
-extern asmregparm struct rw_semaphore *rwsem_wake(struct rw_semaphore *);
-extern asmregparm struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem);
+extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem);
+extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem);
+extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *);
+extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem);
 
 /* Include the arch specific part */
 #include <asm/rwsem.h>
diff --git a/lib/rwsem.c b/lib/rwsem.c
index f236d7c..aa7c305 100644
--- a/lib/rwsem.c
+++ b/lib/rwsem.c
@@ -222,8 +222,7 @@ rwsem_down_failed_common(struct rw_semaphore *sem,
 /*
  * wait for the read lock to be granted
  */
-asmregparm struct rw_semaphore __sched *
-rwsem_down_read_failed(struct rw_semaphore *sem)
+struct rw_semaphore __sched *rwsem_down_read_failed(struct rw_semaphore *sem)
 {
 	return rwsem_down_failed_common(sem, RWSEM_WAITING_FOR_READ,
 					-RWSEM_ACTIVE_READ_BIAS);
@@ -232,8 +231,7 @@ rwsem_down_read_failed(struct rw_semaphore *sem)
 /*
  * wait for the write lock to be granted
  */
-asmregparm struct rw_semaphore __sched *
-rwsem_down_write_failed(struct rw_semaphore *sem)
+struct rw_semaphore __sched *rwsem_down_write_failed(struct rw_semaphore *sem)
 {
 	return rwsem_down_failed_common(sem, RWSEM_WAITING_FOR_WRITE,
 					-RWSEM_ACTIVE_WRITE_BIAS);
@@ -243,7 +241,7 @@ rwsem_down_write_failed(struct rw_semaphore *sem)
  * handle waking up a waiter on the semaphore
  * - up_read/up_write has decremented the active part of count if we come here
  */
-asmregparm struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem)
+struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem)
 {
 	unsigned long flags;
 
@@ -263,7 +261,7 @@ asmregparm struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem)
  * - caller incremented waiting part of count and discovered it still negative
  * - just wake up any readers at the front of the queue
  */
-asmregparm struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem)
+struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem)
 {
 	unsigned long flags;
 

  reply	other threads:[~2011-01-27 11:58 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-26 20:05 [patch 0/6] rwsem: Cleanup duplicate code all over the place Thomas Gleixner
2011-01-26 20:05 ` [patch 1/6] rwsem: Cleanup includes Thomas Gleixner
2011-01-27  4:43   ` David Miller
2011-01-27 11:55   ` [tip:core/locking] " tip-bot for Thomas Gleixner
2011-01-26 20:05 ` [patch 2/6] x86: Cleanup rwsem_count_t typedef Thomas Gleixner
2011-01-27 11:56   ` [tip:core/locking] " tip-bot for Thomas Gleixner
2011-01-26 20:05 ` [patch 3/6] rwsem: Move duplicate struct rwsem declaration to linux/rwsem.h Thomas Gleixner
2011-01-27  4:44   ` David Miller
2011-01-27 11:56   ` [tip:core/locking] " tip-bot for Thomas Gleixner
2011-01-26 20:06 ` [patch 4/6] rwsem: Move duplicate init macros and functions " Thomas Gleixner
2011-01-27  4:45   ` David Miller
2011-01-27 11:56   ` [tip:core/locking] " tip-bot for Thomas Gleixner
2011-01-26 20:06 ` [patch 5/6] rwsem: Unify the duplicate rwsem_is_locked() inlines Thomas Gleixner
2011-01-27  4:45   ` David Miller
2011-01-27 11:57   ` [tip:core/locking] " tip-bot for Thomas Gleixner
2011-01-26 20:06 ` [patch 6/6] rwsem: Move duplicate function prototypes to linux/rwsem.h Thomas Gleixner
2011-01-26 20:32   ` rwsem: rwsem: Remove redundant asmregparm annotation Thomas Gleixner
2011-01-27 11:58     ` tip-bot for Thomas Gleixner [this message]
2011-01-27 15:03     ` David Howells
2011-01-27 15:12       ` Thomas Gleixner
2011-01-27  4:45   ` [patch 6/6] rwsem: Move duplicate function prototypes to linux/rwsem.h David Miller
2011-01-27 11:57   ` [tip:core/locking] " tip-bot for Thomas Gleixner
2011-01-26 22:55 ` [patch 0/6] rwsem: Cleanup duplicate code all over the place Tony Luck
2011-01-27  6:38 ` Heiko Carstens
2011-01-27 14:54 ` David Howells

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=tip-d123375425d7df4b6081a631fc1203fceafa59b2@git.kernel.org \
    --to=tglx@linutronix.de \
    --cc=benh@kernel.crashing.org \
    --cc=chris@zankel.net \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hpa@zytor.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mattst88@gmail.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tony.luck@intel.com \
    /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