提交 cdeb380a 编写于 作者: E Eric Sandeen 提交者: Lachlan McIlroy

[XFS] remove INT_GET and friends

Thanks to hch's endian work, INT_GET etc are no longer used, and may as
well be removed. INT_SET is still used in the acl code, though.

SGI-PV: 981498

SGI-Modid: xfs-linux-melb:xfs-kern:31756a
Signed-off-by: NEric Sandeen <sandeen@sandeen.net>
Signed-off-by: NNiv Sardi <xaiki@sgi.com>
Signed-off-by: NChristoph Hellwig <hch@infradead.org>
Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
上级 322ff6b8
......@@ -92,16 +92,6 @@
((__u8*)(pointer))[1] = (((value) ) & 0xff); \
}
/* define generic INT_ macros */
#define INT_GET(reference,arch) \
(((arch) == ARCH_NOCONVERT) \
? \
(reference) \
: \
INT_SWAP((reference),(reference)) \
)
/* does not return a value */
#define INT_SET(reference,arch,valueref) \
(__builtin_constant_p(valueref) ? \
......@@ -112,64 +102,6 @@
) \
)
/* does not return a value */
#define INT_MOD_EXPR(reference,arch,code) \
(((arch) == ARCH_NOCONVERT) \
? \
(void)((reference) code) \
: \
(void)( \
(reference) = INT_GET((reference),arch) , \
((reference) code), \
INT_SET(reference, arch, reference) \
) \
)
/* does not return a value */
#define INT_MOD(reference,arch,delta) \
(void)( \
INT_MOD_EXPR(reference,arch,+=(delta)) \
)
/*
* INT_COPY - copy a value between two locations with the
* _same architecture_ but _potentially different sizes_
*
* if the types of the two parameters are equal or they are
* in native architecture, a simple copy is done
*
* otherwise, architecture conversions are done
*
*/
/* does not return a value */
#define INT_COPY(dst,src,arch) \
( \
((sizeof(dst) == sizeof(src)) || ((arch) == ARCH_NOCONVERT)) \
? \
(void)((dst) = (src)) \
: \
INT_SET(dst, arch, INT_GET(src, arch)) \
)
/*
* INT_XLATE - copy a value in either direction between two locations
* with different architectures
*
* dir < 0 - copy from memory to buffer (native to arch)
* dir > 0 - copy from buffer to memory (arch to native)
*/
/* does not return a value */
#define INT_XLATE(buf,mem,dir,arch) {\
ASSERT(dir); \
if (dir>0) { \
(mem)=INT_GET(buf, arch); \
} else { \
INT_SET(buf, arch, mem); \
} \
}
/*
* In directories inode numbers are stored as unaligned arrays of unsigned
* 8bit integers on disk.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册