* [PATCH] XFS: Delete duplicate macro definitions.
@ 2007-09-14 12:53 Robert P. J. Day
2007-09-14 14:07 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Robert P. J. Day @ 2007-09-14 12:53 UTC (permalink / raw)
To: xfs
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
---
something that popped out of a script i have that scans for
redundant macro definitions. apply or not as you see fit. not
compile-tested as it was just done visually.
diff --git a/fs/xfs/xfs_bmap_btree.h b/fs/xfs/xfs_bmap_btree.h
index a77b1b7..0173575 100644
--- a/fs/xfs/xfs_bmap_btree.h
+++ b/fs/xfs/xfs_bmap_btree.h
@@ -47,28 +47,25 @@ typedef struct xfs_bmdr_block {
* l1:0-20 are blockcount.
*/
+#define BMBT_TOTAL_BITLEN 128 /* 128 bits, 16 bytes */
+#define BMBT_EXNTFLAG_BITLEN 1
+#define BMBT_STARTOFF_BITLEN 54
+#define BMBT_STARTBLOCK_BITLEN 52
+
#ifndef XFS_NATIVE_HOST
-#define BMBT_TOTAL_BITLEN 128 /* 128 bits, 16 bytes */
#define BMBT_EXNTFLAG_BITOFF 0
-#define BMBT_EXNTFLAG_BITLEN 1
#define BMBT_STARTOFF_BITOFF (BMBT_EXNTFLAG_BITOFF + BMBT_EXNTFLAG_BITLEN)
-#define BMBT_STARTOFF_BITLEN 54
#define BMBT_STARTBLOCK_BITOFF (BMBT_STARTOFF_BITOFF + BMBT_STARTOFF_BITLEN)
-#define BMBT_STARTBLOCK_BITLEN 52
#define BMBT_BLOCKCOUNT_BITOFF \
(BMBT_STARTBLOCK_BITOFF + BMBT_STARTBLOCK_BITLEN)
#define BMBT_BLOCKCOUNT_BITLEN (BMBT_TOTAL_BITLEN - BMBT_BLOCKCOUNT_BITOFF)
#else
-#define BMBT_TOTAL_BITLEN 128 /* 128 bits, 16 bytes */
#define BMBT_EXNTFLAG_BITOFF 63
-#define BMBT_EXNTFLAG_BITLEN 1
#define BMBT_STARTOFF_BITOFF (BMBT_EXNTFLAG_BITOFF - BMBT_STARTOFF_BITLEN)
-#define BMBT_STARTOFF_BITLEN 54
#define BMBT_STARTBLOCK_BITOFF 85 /* 128 - 43 (other 9 is in first word) */
-#define BMBT_STARTBLOCK_BITLEN 52
#define BMBT_BLOCKCOUNT_BITOFF 64 /* Start of second 64 bit container */
#define BMBT_BLOCKCOUNT_BITLEN 21
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://crashcourse.ca
========================================================================
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] XFS: Delete duplicate macro definitions.
2007-09-14 12:53 [PATCH] XFS: Delete duplicate macro definitions Robert P. J. Day
@ 2007-09-14 14:07 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2007-09-14 14:07 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: xfs
On Fri, Sep 14, 2007 at 08:53:20AM -0400, Robert P. J. Day wrote:
>
> Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
>
> ---
>
> something that popped out of a script i have that scans for
> redundant macro definitions. apply or not as you see fit. not
> compile-tested as it was just done visually.
Yes, this is correct. But I've already done this and a little more
in this area - these changes are in XFS CVS already and will go into
2.6.24.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-09-14 14:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-14 12:53 [PATCH] XFS: Delete duplicate macro definitions Robert P. J. Day
2007-09-14 14:07 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox