Re: [PATCH] MIPS: crash_dump.c: Simplify copy_oldmem_page()

From: kernel test robot
Date: Fri Feb 05 2021 - 06:35:41 EST


Hi Youling,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.11-rc6 next-20210125]
[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/Youling-Tang/MIPS-crash_dump-c-Simplify-copy_oldmem_page/20210205-174220
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 61556703b610a104de324e4f061dc6cf7b218b46
config: mips-allyesconfig (attached as .config)
compiler: mips-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/b784382bee7f0a7c02539598bfb477bf10f16c85
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Youling-Tang/MIPS-crash_dump-c-Simplify-copy_oldmem_page/20210205-174220
git checkout b784382bee7f0a7c02539598bfb477bf10f16c85
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips

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

All warnings (new ones prefixed by >>):

>> arch/mips/kernel/crash_dump.c:17:9: warning: no previous prototype for 'copy_oldmem_page' [-Wmissing-prototypes]
17 | ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
| ^~~~~~~~~~~~~~~~


vim +/copy_oldmem_page +17 arch/mips/kernel/crash_dump.c

7aa1c8f47e7e79 Ralf Baechle 2012-10-11 3
7aa1c8f47e7e79 Ralf Baechle 2012-10-11 4 /**
7aa1c8f47e7e79 Ralf Baechle 2012-10-11 5 * copy_oldmem_page - copy one page from "oldmem"
7aa1c8f47e7e79 Ralf Baechle 2012-10-11 6 * @pfn: page frame number to be copied
7aa1c8f47e7e79 Ralf Baechle 2012-10-11 7 * @buf: target memory address for the copy; this can be in kernel address
7aa1c8f47e7e79 Ralf Baechle 2012-10-11 8 * space or user address space (see @userbuf)
7aa1c8f47e7e79 Ralf Baechle 2012-10-11 9 * @csize: number of bytes to copy
7aa1c8f47e7e79 Ralf Baechle 2012-10-11 10 * @offset: offset in bytes into the page (based on pfn) to begin the copy
7aa1c8f47e7e79 Ralf Baechle 2012-10-11 11 * @userbuf: if set, @buf is in user address space, use copy_to_user(),
7aa1c8f47e7e79 Ralf Baechle 2012-10-11 12 * otherwise @buf is in kernel address space, use memcpy().
7aa1c8f47e7e79 Ralf Baechle 2012-10-11 13 *
7aa1c8f47e7e79 Ralf Baechle 2012-10-11 14 * Copy a page from "oldmem". For this page, there is no pte mapped
7aa1c8f47e7e79 Ralf Baechle 2012-10-11 15 * in the current kernel.
7aa1c8f47e7e79 Ralf Baechle 2012-10-11 16 */
7aa1c8f47e7e79 Ralf Baechle 2012-10-11 @17 ssize_t copy_oldmem_page(unsigned long pfn, char *buf,

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

Attachment: .config.gz
Description: application/gzip