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
1285e4c8
Commit
1285e4c8
authored
Jun 22, 2012
by
Cong Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
highmem: remove the deprecated form of kmap_atomic
Signed-off-by:
Cong Wang
<
amwang@redhat.com
>
parent
61d06c83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
40 deletions
+1
-40
include/linux/highmem.h
include/linux/highmem.h
+1
-40
No files found.
include/linux/highmem.h
View file @
1285e4c8
...
@@ -109,55 +109,16 @@ static inline void kmap_atomic_idx_pop(void)
...
@@ -109,55 +109,16 @@ static inline void kmap_atomic_idx_pop(void)
#endif
#endif
/*
* NOTE:
* kmap_atomic() and kunmap_atomic() with two arguments are deprecated.
* We only keep them for backward compatibility, any usage of them
* are now warned.
*/
#define PASTE(a, b) a ## b
#define PASTE2(a, b) PASTE(a, b)
#define NARG_(_2, _1, n, ...) n
#define NARG(...) NARG_(__VA_ARGS__, 2, 1, :)
static
inline
void
__deprecated
*
kmap_atomic_deprecated
(
struct
page
*
page
,
enum
km_type
km
)
{
return
kmap_atomic
(
page
);
}
#define kmap_atomic1(...) kmap_atomic(__VA_ARGS__)
#define kmap_atomic2(...) kmap_atomic_deprecated(__VA_ARGS__)
#define kmap_atomic(...) PASTE2(kmap_atomic, NARG(__VA_ARGS__)(__VA_ARGS__))
static
inline
void
__deprecated
__kunmap_atomic_deprecated
(
void
*
addr
,
enum
km_type
km
)
{
__kunmap_atomic
(
addr
);
}
/*
/*
* Prevent people trying to call kunmap_atomic() as if it were kunmap()
* Prevent people trying to call kunmap_atomic() as if it were kunmap()
* kunmap_atomic() should get the return value of kmap_atomic, not the page.
* kunmap_atomic() should get the return value of kmap_atomic, not the page.
*/
*/
#define kunmap_atomic_deprecated(addr, km) \
#define kunmap_atomic(addr) \
do { \
BUILD_BUG_ON(__same_type((addr), struct page *)); \
__kunmap_atomic_deprecated(addr, km); \
} while (0)
#define kunmap_atomic_withcheck(addr) \
do { \
do { \
BUILD_BUG_ON(__same_type((addr), struct page *)); \
BUILD_BUG_ON(__same_type((addr), struct page *)); \
__kunmap_atomic(addr); \
__kunmap_atomic(addr); \
} while (0)
} while (0)
#define kunmap_atomic1(...) kunmap_atomic_withcheck(__VA_ARGS__)
#define kunmap_atomic2(...) kunmap_atomic_deprecated(__VA_ARGS__)
#define kunmap_atomic(...) PASTE2(kunmap_atomic, NARG(__VA_ARGS__)(__VA_ARGS__))
/**** End of C pre-processor tricks for deprecated macros ****/
/* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */
/* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */
#ifndef clear_user_highpage
#ifndef clear_user_highpage
...
...
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