Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

highmem: remove the deprecated form of kmap_atomic

Signed-off-by: Cong Wang <amwang@redhat.com>

Cong Wang 1285e4c8 61d06c83

+1 -40
+1 -40
include/linux/highmem.h
··· 110 110 #endif 111 111 112 112 /* 113 - * NOTE: 114 - * kmap_atomic() and kunmap_atomic() with two arguments are deprecated. 115 - * We only keep them for backward compatibility, any usage of them 116 - * are now warned. 117 - */ 118 - 119 - #define PASTE(a, b) a ## b 120 - #define PASTE2(a, b) PASTE(a, b) 121 - 122 - #define NARG_(_2, _1, n, ...) n 123 - #define NARG(...) NARG_(__VA_ARGS__, 2, 1, :) 124 - 125 - static inline void __deprecated *kmap_atomic_deprecated(struct page *page, 126 - enum km_type km) 127 - { 128 - return kmap_atomic(page); 129 - } 130 - 131 - #define kmap_atomic1(...) kmap_atomic(__VA_ARGS__) 132 - #define kmap_atomic2(...) kmap_atomic_deprecated(__VA_ARGS__) 133 - #define kmap_atomic(...) PASTE2(kmap_atomic, NARG(__VA_ARGS__)(__VA_ARGS__)) 134 - 135 - static inline void __deprecated __kunmap_atomic_deprecated(void *addr, 136 - enum km_type km) 137 - { 138 - __kunmap_atomic(addr); 139 - } 140 - 141 - /* 142 113 * Prevent people trying to call kunmap_atomic() as if it were kunmap() 143 114 * kunmap_atomic() should get the return value of kmap_atomic, not the page. 144 115 */ 145 - #define kunmap_atomic_deprecated(addr, km) \ 146 - do { \ 147 - BUILD_BUG_ON(__same_type((addr), struct page *)); \ 148 - __kunmap_atomic_deprecated(addr, km); \ 149 - } while (0) 150 - 151 - #define kunmap_atomic_withcheck(addr) \ 116 + #define kunmap_atomic(addr) \ 152 117 do { \ 153 118 BUILD_BUG_ON(__same_type((addr), struct page *)); \ 154 119 __kunmap_atomic(addr); \ 155 120 } while (0) 156 121 157 - #define kunmap_atomic1(...) kunmap_atomic_withcheck(__VA_ARGS__) 158 - #define kunmap_atomic2(...) kunmap_atomic_deprecated(__VA_ARGS__) 159 - #define kunmap_atomic(...) PASTE2(kunmap_atomic, NARG(__VA_ARGS__)(__VA_ARGS__)) 160 - /**** End of C pre-processor tricks for deprecated macros ****/ 161 122 162 123 /* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */ 163 124 #ifndef clear_user_highpage