public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Subject: [PATCH 21/22] xfsprogs: define min/max once and use them everywhere.
Date: Wed, 12 Jun 2013 20:36:33 +1000	[thread overview]
Message-ID: <1371033394-26006-22-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1371033394-26006-1-git-send-email-david@fromorbit.com>

From: Dave Chinner <dchinner@redhat.com>

Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
 include/libxfs.h           |    1 -
 include/platform_defs.h.in |    5 +++++
 io/init.h                  |    3 ---
 libxfs/rdwr.c              |    1 -
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/libxfs.h b/include/libxfs.h
index e57e2fd..6331067 100644
--- a/include/libxfs.h
+++ b/include/libxfs.h
@@ -72,7 +72,6 @@
 #define __round_mask(x, y) ((__typeof__(x))((y)-1))
 #define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1)
 #define round_down(x, y) ((x) & ~__round_mask(x, y))
-#define min(a,b)	((a) < (b) ? (a) : (b))
 
 /*
  * Argument structure for libxfs_init().
diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in
index 217d6c0..03391f5 100644
--- a/include/platform_defs.h.in
+++ b/include/platform_defs.h.in
@@ -168,4 +168,9 @@ typedef unsigned long long __psunsigned_t;
 #define __arch_pack
 #endif
 
+#ifndef min
+#define min(a,b)	(((a)<(b))?(a):(b))
+#define max(a,b)	(((a)>(b))?(a):(b))
+#endif
+
 #endif	/* __XFS_PLATFORM_DEFS_H__ */
diff --git a/io/init.h b/io/init.h
index 1dac211..d773b1b 100644
--- a/io/init.h
+++ b/io/init.h
@@ -26,7 +26,4 @@ extern int	expert;
 extern size_t	pagesize;
 extern struct timeval stopwatch;
 
-#define min(a,b)	(((a)<(b))?(a):(b))
-#define max(a,b)	(((a)>(b))?(a):(b))
-
 extern void init_cvtnum(size_t *blocksize, size_t *sectsize);
diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c
index c679f81..93beb23 100644
--- a/libxfs/rdwr.c
+++ b/libxfs/rdwr.c
@@ -22,7 +22,6 @@
 #include "init.h"
 
 #define BDSTRAT_SIZE	(256 * 1024)
-#define min(x, y)	((x) < (y) ? (x) : (y))
 
 #define IO_BCOMPARE_CHECK
 
-- 
1.7.10.4

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  parent reply	other threads:[~2013-06-12 10:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-12 10:36 [PATCH 00/22] xfsprogs: sync up with 3.11 kernel code Dave Chinner
2013-06-12 10:36 ` [PATCH 01/22] xfsprogs: introduce xfs_icreate.h Dave Chinner
2013-06-12 10:36 ` [PATCH 02/22] xfsprogs: port inode create transaction changes Dave Chinner
2013-06-12 10:36 ` [PATCH 03/22] xfsprogs: teach logprint about icreate transaction Dave Chinner
2013-06-12 10:36 ` [PATCH 04/22] libxfs: switch over to xfs_sb.c and remove xfs_mount.c Dave Chinner
2013-06-12 10:36 ` [PATCH 05/22] libxfs: move the transaction reservation structures Dave Chinner
2013-06-12 10:36 ` [PATCH 06/22] xfsprogs: remove xfs_mount.h Dave Chinner
2013-06-12 10:36 ` [PATCH 07/22] libxfs: update xfs_inode.h to match new kernel version Dave Chinner
2013-06-12 10:36 ` [PATCH 08/22] xfs: remove local fork format handling from xfs_bmapi_write() Dave Chinner
2013-06-12 10:36 ` [PATCH 09/22] libxfs: local to remote format support of remote symlinks Dave Chinner
2013-06-12 10:36 ` [PATCH 10/22] xfsprogs: sync minor kernel header differences Dave Chinner
2013-06-12 10:36 ` [PATCH 11/22] libxfs: introduce xfs_trans_resv.c Dave Chinner
2013-06-12 10:36 ` [PATCH 12/22] libxfs: fix directory/attribute format issues Dave Chinner
2013-06-12 10:36 ` [PATCH 13/22] libxfs: ensure btree root split sets blkno correctly Dave Chinner
2013-06-12 10:36 ` [PATCH 14/22] libxfs: move transaction code to trans.c Dave Chinner
2013-06-12 10:36 ` [PATCH 15/22] libxfs: fix byte swapping on constants Dave Chinner
2013-06-12 10:36 ` [PATCH 16/22] libxfs: sync xfs_da_btree.c Dave Chinner
2013-06-12 10:36 ` [PATCH 17/22] libxfs: update xfs_alloc to current kernel version Dave Chinner
2013-06-12 10:36 ` [PATCH 18/22] libxfs: sync attr code with kernel Dave Chinner
2013-06-12 10:36 ` [PATCH 19/22] libxfs: sync dir2 kernel differences Dave Chinner
2013-06-12 10:36 ` [PATCH 20/22] libxfs: sync xfs_ialloc.c to the kernel code Dave Chinner
2013-06-12 10:36 ` Dave Chinner [this message]
2013-06-12 10:36 ` [PATCH 22/22] libxfs: fix compile warnings Dave Chinner

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=1371033394-26006-22-git-send-email-david@fromorbit.com \
    --to=david@fromorbit.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox