Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
ea8e69e8
Commit
ea8e69e8
authored
Jun 02, 2002
by
Anton Blanchard
Committed by
Linus Torvalds
Jun 02, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Fix for recent swap changes on 64 bit archs
This fixes two shift warnings on 64 bit archs.
parent
353e641f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
include/linux/swapops.h
include/linux/swapops.h
+2
-2
No files found.
include/linux/swapops.h
View file @
ea8e69e8
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
* swp_entry_t's are *never* stored anywhere in their arch-dependent format.
* 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_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) ((1
UL
<< SWP_TYPE_SHIFT(e)) - 1)
/*
/*
* Store a type+offset into a swp_entry_t in an arch-independent format
* 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)
...
@@ -19,7 +19,7 @@ static inline swp_entry_t swp_entry(unsigned type, pgoff_t offset)
{
{
swp_entry_t
ret
;
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
));
(
offset
&
SWP_OFFSET_MASK
(
ret
));
return
ret
;
return
ret
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment