Hi,
I love your patch! Perhaps something to improve:
[auto build test WARNING on hch-configfs/for-next]
[also build test WARNING on linus/master hnaz-linux-mm/master v5.10-rc7]
[cannot apply to mmotm/master next-20201210]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/ira-weiny-intel-com/mm-highmem-R...
base:
git://git.infradead.org/users/hch/configfs.git for-next
config: i386-randconfig-s001-20201210 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-179-ga00755aa-dirty
#
https://github.com/0day-ci/linux/commit/9580f83142cf2df75ceb9e7dbe1939012...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
ira-weiny-intel-com/mm-highmem-Remove-deprecated-kmap_atomic/20201211-021920
git checkout 9580f83142cf2df75ceb9e7dbe1939012818722c
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/pagemap.h:11,
from include/linux/blkdev.h:14,
from include/linux/blk-cgroup.h:23,
from include/linux/writeback.h:14,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from arch/x86/kernel/asm-offsets.c:13:
include/linux/highmem.h: In function 'clear_user_highpage':
include/linux/highmem.h:229:15: error: implicit declaration of function
'kmap_local_page'; did you mean 'kmap_to_page'?
[-Werror=implicit-function-declaration]
229 | void *addr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
| kmap_to_page
include/linux/highmem.h:229:15: warning: initialization of 'void *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
include/linux/highmem.h:231:2: error: implicit declaration of function
'kunmap_local' [-Werror=implicit-function-declaration]
231 | kunmap_local(addr);
| ^~~~~~~~~~~~
include/linux/highmem.h: In function 'clear_highpage':
include/linux/highmem.h:282:16: warning: initialization of 'void *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
282 | void *kaddr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'zero_user_segments':
include/linux/highmem.h:291:16: warning: initialization of 'void *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
291 | void *kaddr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'copy_user_highpage':
include/linux/highmem.h:324:8: warning: assignment to 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
324 | vfrom = kmap_local_page(from);
| ^
include/linux/highmem.h:325:6: warning: assignment to 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
325 | vto = kmap_local_page(to);
| ^
include/linux/highmem.h: In function 'copy_highpage':
include/linux/highmem.h:339:8: warning: assignment to 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
339 | vfrom = kmap_local_page(from);
| ^
include/linux/highmem.h:340:6: warning: assignment to 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
340 | vto = kmap_local_page(to);
| ^
include/linux/highmem.h: In function 'memcpy_page':
> include/linux/highmem.h:352:14: warning: initialization of
'char *' from 'int' makes pointer from integer without a cast
[-Wint-conversion]
352 | char *dst = kmap_local_page(dst_page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h:353:14: warning: initialization of 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
353 | char *src = kmap_local_page(src_page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'memmove_page':
include/linux/highmem.h:365:14: warning: initialization of 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
365 | char *dst = kmap_local_page(dst_page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h:366:14: warning: initialization of 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
366 | char *src = kmap_local_page(src_page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'memcpy_from_page':
include/linux/highmem.h:376:15: warning: initialization of 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
376 | char *from = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'memcpy_to_page':
include/linux/highmem.h:385:13: warning: initialization of 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
385 | char *to = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'memset_page':
include/linux/highmem.h:394:15: warning: initialization of 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
394 | char *addr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from include/linux/pagemap.h:11,
from include/linux/blkdev.h:14,
from include/linux/blk-cgroup.h:23,
from include/linux/writeback.h:14,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from arch/x86/kernel/asm-offsets.c:13:
include/linux/highmem.h: In function 'clear_user_highpage':
include/linux/highmem.h:229:15: error: implicit declaration of function
'kmap_local_page'; did you mean 'kmap_to_page'?
[-Werror=implicit-function-declaration]
229 | void *addr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
| kmap_to_page
include/linux/highmem.h:229:15: warning: initialization of 'void *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
include/linux/highmem.h:231:2: error: implicit declaration of function
'kunmap_local' [-Werror=implicit-function-declaration]
231 | kunmap_local(addr);
| ^~~~~~~~~~~~
include/linux/highmem.h: In function 'clear_highpage':
include/linux/highmem.h:282:16: warning: initialization of 'void *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
282 | void *kaddr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'zero_user_segments':
include/linux/highmem.h:291:16: warning: initialization of 'void *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
291 | void *kaddr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'copy_user_highpage':
include/linux/highmem.h:324:8: warning: assignment to 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
324 | vfrom = kmap_local_page(from);
| ^
include/linux/highmem.h:325:6: warning: assignment to 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
325 | vto = kmap_local_page(to);
| ^
include/linux/highmem.h: In function 'copy_highpage':
include/linux/highmem.h:339:8: warning: assignment to 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
339 | vfrom = kmap_local_page(from);
| ^
include/linux/highmem.h:340:6: warning: assignment to 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
340 | vto = kmap_local_page(to);
| ^
include/linux/highmem.h: In function 'memcpy_page':
> include/linux/highmem.h:352:14: warning: initialization of
'char *' from 'int' makes pointer from integer without a cast
[-Wint-conversion]
352 | char *dst = kmap_local_page(dst_page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h:353:14: warning: initialization of 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
353 | char *src = kmap_local_page(src_page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'memmove_page':
include/linux/highmem.h:365:14: warning: initialization of 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
365 | char *dst = kmap_local_page(dst_page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h:366:14: warning: initialization of 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
366 | char *src = kmap_local_page(src_page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'memcpy_from_page':
include/linux/highmem.h:376:15: warning: initialization of 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
376 | char *from = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'memcpy_to_page':
include/linux/highmem.h:385:13: warning: initialization of 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
385 | char *to = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'memset_page':
include/linux/highmem.h:394:15: warning: initialization of 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
394 | char *addr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: arch/x86/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1200: prepare0] Error 2
make[1]: Target 'modules_prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
In file included from include/linux/pagemap.h:11,
from include/linux/blkdev.h:14,
from include/linux/blk-cgroup.h:23,
from include/linux/writeback.h:14,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from arch/x86/kernel/asm-offsets.c:13:
include/linux/highmem.h: In function 'clear_user_highpage':
include/linux/highmem.h:229:15: error: implicit declaration of function
'kmap_local_page'; did you mean 'kmap_to_page'?
[-Werror=implicit-function-declaration]
229 | void *addr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
| kmap_to_page
include/linux/highmem.h:229:15: warning: initialization of 'void *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
include/linux/highmem.h:231:2: error: implicit declaration of function
'kunmap_local' [-Werror=implicit-function-declaration]
231 | kunmap_local(addr);
| ^~~~~~~~~~~~
include/linux/highmem.h: In function 'clear_highpage':
include/linux/highmem.h:282:16: warning: initialization of 'void *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
282 | void *kaddr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'zero_user_segments':
include/linux/highmem.h:291:16: warning: initialization of 'void *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
291 | void *kaddr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'copy_user_highpage':
include/linux/highmem.h:324:8: warning: assignment to 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
324 | vfrom = kmap_local_page(from);
| ^
include/linux/highmem.h:325:6: warning: assignment to 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
325 | vto = kmap_local_page(to);
| ^
include/linux/highmem.h: In function 'copy_highpage':
include/linux/highmem.h:339:8: warning: assignment to 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
339 | vfrom = kmap_local_page(from);
| ^
include/linux/highmem.h:340:6: warning: assignment to 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
340 | vto = kmap_local_page(to);
| ^
include/linux/highmem.h: In function 'memcpy_page':
> include/linux/highmem.h:352:14: warning: initialization of
'char *' from 'int' makes pointer from integer without a cast
[-Wint-conversion]
352 | char *dst = kmap_local_page(dst_page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h:353:14: warning: initialization of 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
353 | char *src = kmap_local_page(src_page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'memmove_page':
include/linux/highmem.h:365:14: warning: initialization of 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
365 | char *dst = kmap_local_page(dst_page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h:366:14: warning: initialization of 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
366 | char *src = kmap_local_page(src_page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'memcpy_from_page':
include/linux/highmem.h:376:15: warning: initialization of 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
376 | char *from = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'memcpy_to_page':
include/linux/highmem.h:385:13: warning: initialization of 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
385 | char *to = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'memset_page':
include/linux/highmem.h:394:15: warning: initialization of 'char *' from
'int' makes pointer from integer without a cast [-Wint-conversion]
394 | char *addr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: arch/x86/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1200: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +352 include/linux/highmem.h
334
335 static inline void copy_highpage(struct page *to, struct page *from)
336 {
337 char *vfrom, *vto;
338
339 vfrom = kmap_local_page(from);
340 vto =
kmap_local_page(to);
341 copy_page(vto, vfrom);
342 kunmap_local(vto);
343 kunmap_local(vfrom);
344 }
345
346 #endif
347
348 static inline void memcpy_page(struct page *dst_page, size_t dst_off,
349 struct page *src_page, size_t src_off,
350 size_t len)
351 {
352 char *dst = kmap_local_page(dst_page);
353 char *src =
kmap_local_page(src_page);
354
355 BUG_ON(dst_off + len > PAGE_SIZE || src_off + len > PAGE_SIZE);
356 memcpy(dst + dst_off, src + src_off, len);
357 kunmap_local(src);
358 kunmap_local(dst);
359 }
360
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org