diff options
| author | Anton Blanchard <anton@samba.org> | 2002-06-02 21:58:18 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-06-02 21:58:18 -0700 |
| commit | ea8e69e88f6e7a8b661ddda84e44ff172988cd01 (patch) | |
| tree | 3accd1e7ab3f4b07b77b8dba65a3232f227532e4 /include | |
| parent | 353e641fc79ce920199dc3c2a54e9123ee283ccc (diff) | |
[PATCH] Fix for recent swap changes on 64 bit archs
This fixes two shift warnings on 64 bit archs.
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/swapops.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/swapops.h b/include/linux/swapops.h index 500f9960d939..1b67fd0a27ab 100644 --- a/include/linux/swapops.h +++ b/include/linux/swapops.h @@ -10,7 +10,7 @@ * swp_entry_t's are *never* stored anywhere in their arch-dependent format. */ #define SWP_TYPE_SHIFT(e) (sizeof(e.val) * 8 - MAX_SWAPFILES_SHIFT) -#define SWP_OFFSET_MASK(e) ((1 << SWP_TYPE_SHIFT(e)) - 1) +#define SWP_OFFSET_MASK(e) ((1UL << SWP_TYPE_SHIFT(e)) - 1) /* * Store a type+offset into a swp_entry_t in an arch-independent format @@ -19,7 +19,7 @@ static inline swp_entry_t swp_entry(unsigned type, pgoff_t offset) { swp_entry_t ret; - ret.val = (type << SWP_TYPE_SHIFT(ret)) | + ret.val = ((unsigned long)type << SWP_TYPE_SHIFT(ret)) | (offset & SWP_OFFSET_MASK(ret)); return ret; } |
