linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Tiezhu Yang <yangtiezhu@loongson.cn>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Mike Rapoport <rppt@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	Linux Memory Management List <linux-mm@kvack.org>,
	Xuefeng Li <lixuefeng@loongson.cn>,
	linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/4] MIPS: Refactor early_parse_memmap() to fix memmap= parameter
Date: Tue, 1 Mar 2022 01:36:47 +0800	[thread overview]
Message-ID: <202203010025.PU3GDSWx-lkp@intel.com> (raw)
In-Reply-To: <1646054617-16799-4-git-send-email-yangtiezhu@loongson.cn>

Hi Tiezhu,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on hnaz-mm/master]
[also build test WARNING on linus/master v5.17-rc6 next-20220225]
[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/Tiezhu-Yang/MIPS-Modify-mem-and-memmap-parameter/20220228-212554
base:   https://github.com/hnaz/linux-mm master
config: mips-randconfig-r025-20220228 (https://download.01.org/0day-ci/archive/20220301/202203010025.PU3GDSWx-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e)
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
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://github.com/0day-ci/linux/commit/ab143b3c599254c414419565480fc01acb23452a
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Tiezhu-Yang/MIPS-Modify-mem-and-memmap-parameter/20220228-212554
        git checkout ab143b3c599254c414419565480fc01acb23452a
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash arch/mips/kernel/

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

All warnings (new ones prefixed by >>):

   arch/mips/kernel/setup.c:351:42: warning: format specifies type 'long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Wformat]
           pr_notice("Memory limited to %lldMB\n", memory_limit >> 20);
                                        ~~~~       ^~~~~~~~~~~~~~~~~~
                                        %u
   include/linux/printk.h:509:36: note: expanded from macro 'pr_notice'
           printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
                                     ~~~     ^~~~~~~~~~~
   include/linux/printk.h:446:60: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                                                       ~~~    ^~~~~~~~~~~
   include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
                   _p_func(_fmt, ##__VA_ARGS__);                           \
                           ~~~~    ^~~~~~~~~~~
   arch/mips/kernel/setup.c:380:6: warning: format specifies type 'long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Wformat]
                             memory_base >> 20, (memory_base + memory_limit) >> 20);
                             ^~~~~~~~~~~~~~~~~
   include/linux/printk.h:509:36: note: expanded from macro 'pr_notice'
           printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
                                     ~~~     ^~~~~~~~~~~
   include/linux/printk.h:446:60: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                                                       ~~~    ^~~~~~~~~~~
   include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
                   _p_func(_fmt, ##__VA_ARGS__);                           \
                           ~~~~    ^~~~~~~~~~~
>> arch/mips/kernel/setup.c:380:25: warning: format specifies type 'long long' but the argument has type 'unsigned int' [-Wformat]
                             memory_base >> 20, (memory_base + memory_limit) >> 20);
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/printk.h:509:36: note: expanded from macro 'pr_notice'
           printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
                                     ~~~     ^~~~~~~~~~~
   include/linux/printk.h:446:60: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                                                       ~~~    ^~~~~~~~~~~
   include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
                   _p_func(_fmt, ##__VA_ARGS__);                           \
                           ~~~~    ^~~~~~~~~~~
   arch/mips/kernel/setup.c:399:5: warning: format specifies type 'long long' but the argument has type 'phys_addr_t' (aka 'unsigned int') [-Wformat]
                     memory_base >> 20, (memory_base + memory_limit) >> 20);
                     ^~~~~~~~~~~~~~~~~
   include/linux/printk.h:509:36: note: expanded from macro 'pr_notice'
           printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
                                     ~~~     ^~~~~~~~~~~
   include/linux/printk.h:446:60: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                                                       ~~~    ^~~~~~~~~~~
   include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
                   _p_func(_fmt, ##__VA_ARGS__);                           \
                           ~~~~    ^~~~~~~~~~~
   arch/mips/kernel/setup.c:399:24: warning: format specifies type 'long long' but the argument has type 'unsigned int' [-Wformat]
                     memory_base >> 20, (memory_base + memory_limit) >> 20);
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/printk.h:509:36: note: expanded from macro 'pr_notice'
           printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
                                     ~~~     ^~~~~~~~~~~
   include/linux/printk.h:446:60: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                                                       ~~~    ^~~~~~~~~~~
   include/linux/printk.h:418:19: note: expanded from macro 'printk_index_wrap'
                   _p_func(_fmt, ##__VA_ARGS__);                           \
                           ~~~~    ^~~~~~~~~~~
   5 warnings generated.


vim +380 arch/mips/kernel/setup.c

   356	
   357	static int __init early_parse_memmap(char *p)
   358	{
   359		char *oldp;
   360	
   361		if (!p)
   362			return -EINVAL;
   363	
   364		if (!strncmp(p, "exactmap", 8)) {
   365			pr_err("\"memmap=exactmap\" invalid on MIPS\n");
   366			return 0;
   367		}
   368	
   369		oldp = p;
   370		memory_limit = memparse(p, &p) & PAGE_MASK;
   371		if (p == oldp)
   372			return -EINVAL;
   373	
   374		if (*p == '@') {
   375			memory_base = memparse(p + 1, &p) & PAGE_MASK;
   376		} else if (*p == '$') {
   377			memory_base = memparse(p+1, &p) & PAGE_MASK;
   378			memblock_reserve(memory_base, memory_limit);
   379			pr_notice("Memory reserved to %lldMB-%lldMB\n",
 > 380				  memory_base >> 20, (memory_base + memory_limit) >> 20);
   381			memory_base = 0;
   382			memory_limit = 0;
   383			return 0;
   384		} else if (*p == '#') {
   385			pr_err("\"memmap=nn#ss\" invalid on MIPS\n");
   386			memory_limit = 0;
   387			return -EINVAL;
   388		} else if (*p == '!') {
   389			pr_err("\"memmap=nn!ss\" invalid on MIPS\n");
   390			memory_limit = 0;
   391			return -EINVAL;
   392		} else {
   393			pr_err("Unrecognized memmap syntax: %s\n", p);
   394			memory_limit = 0;
   395			return -EINVAL;
   396		}
   397	
   398		pr_notice("Memory limited to %lldMB-%lldMB\n",
   399			  memory_base >> 20, (memory_base + memory_limit) >> 20);
   400	
   401		return *p == '\0' ? 0 : -EINVAL;
   402	}
   403	early_param("memmap", early_parse_memmap);
   404	

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


  reply	other threads:[~2022-02-28 17:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28 13:23 [PATCH v3 0/4] MIPS: Modify mem= and memmap= parameter Tiezhu Yang
2022-02-28 13:23 ` [PATCH v3 1/4] MIPS: Refactor early_parse_mem() to fix mem= parameter Tiezhu Yang
2022-02-28 17:36   ` kernel test robot
2022-02-28 13:23 ` [PATCH v3 2/4] memblock: Introduce memblock_mem_range_remove_map() Tiezhu Yang
2022-02-28 13:23 ` [PATCH v3 3/4] MIPS: Refactor early_parse_memmap() to fix memmap= parameter Tiezhu Yang
2022-02-28 17:36   ` kernel test robot [this message]
2022-02-28 13:23 ` [PATCH v3 4/4] MIPS: Remove not used variable usermem Tiezhu Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202203010025.PU3GDSWx-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lixuefeng@loongson.cn \
    --cc=llvm@lists.linux.dev \
    --cc=rppt@kernel.org \
    --cc=tsbogend@alpha.franken.de \
    --cc=yangtiezhu@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).