All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: xfs mailing list <xfs@oss.sgi.com>
Subject: [PATCH] remove flag-less mraccessf/mrupdatef
Date: Fri, 10 Nov 2006 21:20:03 -0600	[thread overview]
Message-ID: <45554163.9060608@sandeen.net> (raw)

mraccessf & mrupdatef are supposed to be the "flags" versions of
the functions, but they

a) ignore the flags parameter completely, and
b) are never called directly, only via the flag-less defines anyway

So, drop the #define indirection, and rename mraccessf to mraccess,
etc.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>

 linux-2.4/mrlock.c       |    4 ++--
 linux-2.4/mrlock_rwsem.h |    6 ++----
 linux-2.6/mrlock.h       |    6 ++----
 3 files changed, 6 insertions(+), 10 deletions(-)

Index: xfs-linux-allpatches/linux-2.6/mrlock.h
===================================================================
--- xfs-linux-allpatches.orig/linux-2.6/mrlock.h
+++ xfs-linux-allpatches/linux-2.6/mrlock.h
@@ -31,15 +31,13 @@ typedef struct {
 	do { (mrp)->mr_writer = 0; init_rwsem(&(mrp)->mr_lock); } while (0)
 #define mrlock_init(mrp, t,n,s)	mrinit(mrp, n)
 #define mrfree(mrp)		do { } while (0)
-#define mraccess(mrp)		mraccessf(mrp, 0)
-#define mrupdate(mrp)		mrupdatef(mrp, 0)
 
-static inline void mraccessf(mrlock_t *mrp, int flags)
+static inline void mraccess(mrlock_t *mrp)
 {
 	down_read(&mrp->mr_lock);
 }
 
-static inline void mrupdatef(mrlock_t *mrp, int flags)
+static inline void mrupdate(mrlock_t *mrp)
 {
 	down_write(&mrp->mr_lock);
 	mrp->mr_writer = 1;
Index: xfs-linux-allpatches/linux-2.4/mrlock.c
===================================================================
--- xfs-linux-allpatches.orig/linux-2.4/mrlock.c
+++ xfs-linux-allpatches/linux-2.4/mrlock.c
@@ -116,7 +116,7 @@ mrlock(mrlock_t *mrp, int type, int flag
 
 /* ARGSUSED */
 void
-mraccessf(mrlock_t *mrp, int flags)
+mraccess(mrlock_t *mrp)
 {
 	MRLOCK(mrp);
 	if(mrp->mr_writes_waiting > 0) {
@@ -135,7 +135,7 @@ mraccessf(mrlock_t *mrp, int flags)
 
 /* ARGSUSED */
 void
-mrupdatef(mrlock_t *mrp, int flags)
+mrupdate(mrlock_t *mrp)
 {
 	MRLOCK(mrp);
 	while(mrp->mr_count) {
Index: xfs-linux-allpatches/linux-2.4/mrlock_rwsem.h
===================================================================
--- xfs-linux-allpatches.orig/linux-2.4/mrlock_rwsem.h
+++ xfs-linux-allpatches/linux-2.4/mrlock_rwsem.h
@@ -31,15 +31,13 @@ typedef struct {
 	( (mrp)->mr_writer = 0, init_rwsem(&(mrp)->mr_lock) )
 #define mrlock_init(mrp, t,n,s)	mrinit(mrp, n)
 #define mrfree(mrp)		do { } while (0)
-#define mraccess(mrp)		mraccessf(mrp, 0)
-#define mrupdate(mrp)		mrupdatef(mrp, 0)
 
-static inline void mraccessf(mrlock_t *mrp, int flags)
+static inline void mraccess(mrlock_t *mrp)
 {
 	down_read(&mrp->mr_lock);
 }
 
-static inline void mrupdatef(mrlock_t *mrp, int flags)
+static inline void mrupdate(mrlock_t *mrp)
 {
 	down_write(&mrp->mr_lock);
 	mrp->mr_writer = 1;

                 reply	other threads:[~2006-11-11  3:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=45554163.9060608@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=xfs@oss.sgi.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 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.