[s390:features 12/14] arch/s390/mm/maccess.c:85:13: warning: no previous prototype for 'memcpy_real_init'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
head:   fba07cd4dd8fb4833015801a83f945b2d65a5c4b
commit: 2f0e8aae26a27fe73d033788f8e92188e7584f41 [12/14] s390/mm: rework memcpy_real() to avoid DAT-off mode
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20220915/202209151106.vetUM3Xc-lkp@xxxxxxxxx/config)
compiler: s390-linux-gcc (GCC) 12.1.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://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git/commit/?id=2f0e8aae26a27fe73d033788f8e92188e7584f41
        git remote add s390 https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git
        git fetch --no-tags s390 features
        git checkout 2f0e8aae26a27fe73d033788f8e92188e7584f41
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash

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

All warnings (new ones prefixed by >>):

>> arch/s390/mm/maccess.c:85:13: warning: no previous prototype for 'memcpy_real_init' [-Wmissing-prototypes]
      85 | void __init memcpy_real_init(void)
         |             ^~~~~~~~~~~~~~~~
>> arch/s390/mm/maccess.c:92:8: warning: no previous prototype for 'memcpy_real_iter' [-Wmissing-prototypes]
      92 | size_t memcpy_real_iter(struct iov_iter *iter, unsigned long src, size_t count)
         |        ^~~~~~~~~~~~~~~~
>> arch/s390/mm/maccess.c:123:5: warning: no previous prototype for 'memcpy_real' [-Wmissing-prototypes]
     123 | int memcpy_real(void *dest, unsigned long src, size_t count)
         |     ^~~~~~~~~~~


vim +/memcpy_real_init +85 arch/s390/mm/maccess.c

    84	
  > 85	void __init memcpy_real_init(void)
    86	{
    87		memcpy_real_ptep = vmem_get_alloc_pte(__memcpy_real_area, true);
    88		if (!memcpy_real_ptep)
    89			panic("Couldn't setup memcpy real area");
    90	}
    91	
  > 92	size_t memcpy_real_iter(struct iov_iter *iter, unsigned long src, size_t count)
    93	{
    94		size_t len, copied, res = 0;
    95		unsigned long phys, offset;
    96		void *chunk;
    97		pte_t pte;
    98	
    99		while (count) {
   100			phys = src & PAGE_MASK;
   101			offset = src & ~PAGE_MASK;
   102			chunk = (void *)(__memcpy_real_area + offset);
   103			len = min(count, PAGE_SIZE - offset);
   104			pte = mk_pte_phys(phys, PAGE_KERNEL_RO);
   105	
   106			mutex_lock(&memcpy_real_mutex);
   107			if (pte_val(pte) != pte_val(*memcpy_real_ptep)) {
   108				__ptep_ipte(__memcpy_real_area, memcpy_real_ptep, 0, 0, IPTE_GLOBAL);
   109				set_pte(memcpy_real_ptep, pte);
   110			}
   111			copied = copy_to_iter(chunk, len, iter);
   112			mutex_unlock(&memcpy_real_mutex);
   113	
   114			count -= copied;
   115			src += copied;
   116			res += copied;
   117			if (copied < len)
   118				break;
   119		}
   120		return res;
   121	}
   122	
 > 123	int memcpy_real(void *dest, unsigned long src, size_t count)
   124	{
   125		struct iov_iter iter;
   126		struct kvec kvec;
   127	
   128		kvec.iov_base = dest;
   129		kvec.iov_len = count;
   130		iov_iter_kvec(&iter, WRITE, &kvec, 1, count);
   131		if (memcpy_real_iter(&iter, src, count) < count)
   132			return -EFAULT;
   133		return 0;
   134	}
   135	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux