mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[XFS] Remove macro-to-function indirections in the mask code
Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Reviewed-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
This commit is contained in:
parent
c9fb86a917
commit
fb82557f16
3 changed files with 44 additions and 52 deletions
|
@ -23,24 +23,16 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* masks with n high/low bits set, 32-bit values & 64-bit values
|
||||
* masks with n high/low bits set, 64-bit values
|
||||
*/
|
||||
#define XFS_MASK32HI(n) xfs_mask32hi(n)
|
||||
static inline __uint32_t xfs_mask32hi(int n)
|
||||
{
|
||||
return (__uint32_t)-1 << (32 - (n));
|
||||
}
|
||||
#define XFS_MASK64HI(n) xfs_mask64hi(n)
|
||||
static inline __uint64_t xfs_mask64hi(int n)
|
||||
{
|
||||
return (__uint64_t)-1 << (64 - (n));
|
||||
}
|
||||
#define XFS_MASK32LO(n) xfs_mask32lo(n)
|
||||
static inline __uint32_t xfs_mask32lo(int n)
|
||||
{
|
||||
return ((__uint32_t)1 << (n)) - 1;
|
||||
}
|
||||
#define XFS_MASK64LO(n) xfs_mask64lo(n)
|
||||
static inline __uint64_t xfs_mask64lo(int n)
|
||||
{
|
||||
return ((__uint64_t)1 << (n)) - 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue