Re: [PATCH V2 2/2] mm/highmem: Lift memcpy_[to|from]_page to core

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 v5.10-rc7]
[cannot apply to hnaz-linux-mm/master next-20201207]
[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/Lift-memcpy_-to-from-_page-to-core/20201208-070017
base:   git://git.infradead.org/users/hch/configfs.git for-next
config: riscv-nommu_k210_defconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/23e6d3f08a315c6e70fde3d63a275c91e1dcb0ee
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review ira-weiny-intel-com/Lift-memcpy_-to-from-_page-to-core/20201208-070017
        git checkout 23e6d3f08a315c6e70fde3d63a275c91e1dcb0ee
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   In file included from drivers/char/mem.c:24:
   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);
         |      ^
   In file included from include/linux/blkdev.h:14,
                    from include/linux/backing-dev.h:15,
                    from drivers/char/mem.c:25:
   include/linux/pagemap.h: In function 'memcpy_page':
>> include/linux/pagemap.h:1036:14: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1036 |  char *dst = kmap_local_page(dst_page);
         |              ^~~~~~~~~~~~~~~
   include/linux/pagemap.h:1037:14: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1037 |  char *src = kmap_local_page(src_page);
         |              ^~~~~~~~~~~~~~~
   include/linux/pagemap.h: In function 'memmove_page':
   include/linux/pagemap.h:1047:14: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1047 |  char *dst = kmap_local_page(dst_page);
         |              ^~~~~~~~~~~~~~~
   include/linux/pagemap.h:1048:14: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1048 |  char *src = kmap_local_page(src_page);
         |              ^~~~~~~~~~~~~~~
   include/linux/pagemap.h: In function 'memcpy_from_page':
   include/linux/pagemap.h:1056:15: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1056 |  char *from = kmap_local_page(page);
         |               ^~~~~~~~~~~~~~~
   include/linux/pagemap.h: In function 'memcpy_to_page':
   include/linux/pagemap.h:1063:13: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1063 |  char *to = kmap_local_page(page);
         |             ^~~~~~~~~~~~~~~
   include/linux/pagemap.h: In function 'memset_page':
   include/linux/pagemap.h:1070:15: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1070 |  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/trace/events/random.h:8,
                    from drivers/char/random.c:348:
   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);
         |      ^
   In file included from include/linux/blkdev.h:14,
                    from include/linux/blk-cgroup.h:23,
                    from include/linux/writeback.h:14,
                    from include/trace/events/random.h:8,
                    from drivers/char/random.c:348:
   include/linux/pagemap.h: In function 'memcpy_page':
>> include/linux/pagemap.h:1036:14: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1036 |  char *dst = kmap_local_page(dst_page);
         |              ^~~~~~~~~~~~~~~
   include/linux/pagemap.h:1037:14: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1037 |  char *src = kmap_local_page(src_page);
         |              ^~~~~~~~~~~~~~~
   include/linux/pagemap.h: In function 'memmove_page':
   include/linux/pagemap.h:1047:14: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1047 |  char *dst = kmap_local_page(dst_page);
         |              ^~~~~~~~~~~~~~~
   include/linux/pagemap.h:1048:14: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1048 |  char *src = kmap_local_page(src_page);
         |              ^~~~~~~~~~~~~~~
   include/linux/pagemap.h: In function 'memcpy_from_page':
   include/linux/pagemap.h:1056:15: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1056 |  char *from = kmap_local_page(page);
         |               ^~~~~~~~~~~~~~~
   include/linux/pagemap.h: In function 'memcpy_to_page':
   include/linux/pagemap.h:1063:13: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1063 |  char *to = kmap_local_page(page);
         |             ^~~~~~~~~~~~~~~
   include/linux/pagemap.h: In function 'memset_page':
   include/linux/pagemap.h:1070:15: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1070 |  char *addr = kmap_local_page(page);
         |               ^~~~~~~~~~~~~~~
   drivers/char/random.c: At top level:
   drivers/char/random.c:2296:6: warning: no previous prototype for 'add_hwgenerator_randomness' [-Wmissing-prototypes]
    2296 | void add_hwgenerator_randomness(const char *buffer, size_t count,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +1036 include/linux/pagemap.h

  1031	
  1032	static inline void memcpy_page(struct page *dst_page, size_t dst_off,
  1033				       struct page *src_page, size_t src_off,
  1034				       size_t len)
  1035	{
> 1036		char *dst = kmap_local_page(dst_page);
  1037		char *src = kmap_local_page(src_page);
  1038		memcpy(dst + dst_off, src + src_off, len);
  1039		kunmap_local(src);
  1040		kunmap_local(dst);
  1041	}
  1042	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux