All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Hildenbrand <david@redhat.com>, linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, linux-mm@kvack.org,
	David Hildenbrand <david@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Dave Hansen <dave.hansen@intel.com>,
	Michal Hocko <mhocko@suse.com>,
	Oscar Salvador <osalvador@suse.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Subject: Re: [PATCH v1 1/2] drivers/base/memory: don't store phys_device in memory blocks
Date: Mon, 1 Feb 2021 21:00:15 +0800	[thread overview]
Message-ID: <202102012056.KCZmZLEr-lkp@intel.com> (raw)
In-Reply-To: <20210201105158.6393-2-david@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3682 bytes --]

Hi David,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linux/master]
[also build test WARNING on driver-core/driver-core-testing 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/David-Hildenbrand/drivers-base-memory-clarify-some-memory-block-properties/20210201-185331
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2ab38c17aac10bf55ab3efde4c4db3893d8691d2
config: x86_64-randconfig-s031-20210201 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-215-g0fb77bb6-dirty
        # https://github.com/0day-ci/linux/commit/614341d29c44f8965a604b9fd5d09eb0b652864c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review David-Hildenbrand/drivers-base-memory-clarify-some-memory-block-properties/20210201-185331
        git checkout 614341d29c44f8965a604b9fd5d09eb0b652864c
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

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 >>):

   drivers/base/memory.c: In function 'init_memory_block':
>> drivers/base/memory.c:573:16: warning: variable 'start_pfn' set but not used [-Wunused-but-set-variable]
     573 |  unsigned long start_pfn;
         |                ^~~~~~~~~


vim +/start_pfn +573 drivers/base/memory.c

96b2c0fc8e74a6 Nathan Fontenot   2013-06-04  569  
40ba2cde77e764 Wei Yang          2020-06-23  570  static int init_memory_block(unsigned long block_id, unsigned long state)
e4619c857d1d76 Nathan Fontenot   2010-10-19  571  {
0c2c99b1b8ab5d Nathan Fontenot   2011-01-20  572  	struct memory_block *mem;
e4619c857d1d76 Nathan Fontenot   2010-10-19 @573  	unsigned long start_pfn;
e4619c857d1d76 Nathan Fontenot   2010-10-19  574  	int ret = 0;
e4619c857d1d76 Nathan Fontenot   2010-10-19  575  
dd625285910d3c David Hildenbrand 2019-07-18  576  	mem = find_memory_block_by_id(block_id);
db051a0dac13db David Hildenbrand 2019-07-18  577  	if (mem) {
db051a0dac13db David Hildenbrand 2019-07-18  578  		put_device(&mem->dev);
db051a0dac13db David Hildenbrand 2019-07-18  579  		return -EEXIST;
db051a0dac13db David Hildenbrand 2019-07-18  580  	}
0c2c99b1b8ab5d Nathan Fontenot   2011-01-20  581  	mem = kzalloc(sizeof(*mem), GFP_KERNEL);
e4619c857d1d76 Nathan Fontenot   2010-10-19  582  	if (!mem)
e4619c857d1d76 Nathan Fontenot   2010-10-19  583  		return -ENOMEM;
e4619c857d1d76 Nathan Fontenot   2010-10-19  584  
1811582587c43b David Hildenbrand 2019-07-18  585  	mem->start_section_nr = block_id * sections_per_block;
e4619c857d1d76 Nathan Fontenot   2010-10-19  586  	mem->state = state;
d33601644cd3b0 Nathan Fontenot   2011-01-20  587  	start_pfn = section_nr_to_pfn(mem->start_section_nr);
d84f2f5a755208 David Hildenbrand 2019-09-23  588  	mem->nid = NUMA_NO_NODE;
e4619c857d1d76 Nathan Fontenot   2010-10-19  589  
0c2c99b1b8ab5d Nathan Fontenot   2011-01-20  590  	ret = register_memory(mem);
0c2c99b1b8ab5d Nathan Fontenot   2011-01-20  591  
0c2c99b1b8ab5d Nathan Fontenot   2011-01-20  592  	return ret;
0c2c99b1b8ab5d Nathan Fontenot   2011-01-20  593  }
0c2c99b1b8ab5d Nathan Fontenot   2011-01-20  594  

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31841 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v1 1/2] drivers/base/memory: don't store phys_device in memory blocks
Date: Mon, 01 Feb 2021 21:00:15 +0800	[thread overview]
Message-ID: <202102012056.KCZmZLEr-lkp@intel.com> (raw)
In-Reply-To: <20210201105158.6393-2-david@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3751 bytes --]

Hi David,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linux/master]
[also build test WARNING on driver-core/driver-core-testing 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/David-Hildenbrand/drivers-base-memory-clarify-some-memory-block-properties/20210201-185331
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2ab38c17aac10bf55ab3efde4c4db3893d8691d2
config: x86_64-randconfig-s031-20210201 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-215-g0fb77bb6-dirty
        # https://github.com/0day-ci/linux/commit/614341d29c44f8965a604b9fd5d09eb0b652864c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review David-Hildenbrand/drivers-base-memory-clarify-some-memory-block-properties/20210201-185331
        git checkout 614341d29c44f8965a604b9fd5d09eb0b652864c
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

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 >>):

   drivers/base/memory.c: In function 'init_memory_block':
>> drivers/base/memory.c:573:16: warning: variable 'start_pfn' set but not used [-Wunused-but-set-variable]
     573 |  unsigned long start_pfn;
         |                ^~~~~~~~~


vim +/start_pfn +573 drivers/base/memory.c

96b2c0fc8e74a6 Nathan Fontenot   2013-06-04  569  
40ba2cde77e764 Wei Yang          2020-06-23  570  static int init_memory_block(unsigned long block_id, unsigned long state)
e4619c857d1d76 Nathan Fontenot   2010-10-19  571  {
0c2c99b1b8ab5d Nathan Fontenot   2011-01-20  572  	struct memory_block *mem;
e4619c857d1d76 Nathan Fontenot   2010-10-19 @573  	unsigned long start_pfn;
e4619c857d1d76 Nathan Fontenot   2010-10-19  574  	int ret = 0;
e4619c857d1d76 Nathan Fontenot   2010-10-19  575  
dd625285910d3c David Hildenbrand 2019-07-18  576  	mem = find_memory_block_by_id(block_id);
db051a0dac13db David Hildenbrand 2019-07-18  577  	if (mem) {
db051a0dac13db David Hildenbrand 2019-07-18  578  		put_device(&mem->dev);
db051a0dac13db David Hildenbrand 2019-07-18  579  		return -EEXIST;
db051a0dac13db David Hildenbrand 2019-07-18  580  	}
0c2c99b1b8ab5d Nathan Fontenot   2011-01-20  581  	mem = kzalloc(sizeof(*mem), GFP_KERNEL);
e4619c857d1d76 Nathan Fontenot   2010-10-19  582  	if (!mem)
e4619c857d1d76 Nathan Fontenot   2010-10-19  583  		return -ENOMEM;
e4619c857d1d76 Nathan Fontenot   2010-10-19  584  
1811582587c43b David Hildenbrand 2019-07-18  585  	mem->start_section_nr = block_id * sections_per_block;
e4619c857d1d76 Nathan Fontenot   2010-10-19  586  	mem->state = state;
d33601644cd3b0 Nathan Fontenot   2011-01-20  587  	start_pfn = section_nr_to_pfn(mem->start_section_nr);
d84f2f5a755208 David Hildenbrand 2019-09-23  588  	mem->nid = NUMA_NO_NODE;
e4619c857d1d76 Nathan Fontenot   2010-10-19  589  
0c2c99b1b8ab5d Nathan Fontenot   2011-01-20  590  	ret = register_memory(mem);
0c2c99b1b8ab5d Nathan Fontenot   2011-01-20  591  
0c2c99b1b8ab5d Nathan Fontenot   2011-01-20  592  	return ret;
0c2c99b1b8ab5d Nathan Fontenot   2011-01-20  593  }
0c2c99b1b8ab5d Nathan Fontenot   2011-01-20  594  

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31841 bytes --]

  reply	other threads:[~2021-02-01 13:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-01 10:51 [PATCH v1 0/2] drivers/base/memory: clarify some memory block properties David Hildenbrand
2021-02-01 10:51 ` [PATCH v1 1/2] drivers/base/memory: don't store phys_device in memory blocks David Hildenbrand
2021-02-01 13:00   ` kernel test robot [this message]
2021-02-01 13:00     ` kernel test robot
2021-02-01 13:27     ` David Hildenbrand
2021-02-01 13:27       ` David Hildenbrand
2021-02-01 15:58   ` Michal Hocko
2021-02-01 10:51 ` [PATCH v1 2/2] Documentation: sysfs/memory: clarify some memory block device properties David Hildenbrand
2021-02-01 16:00   ` Michal Hocko

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=202102012056.KCZmZLEr-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=dave.hansen@intel.com \
    --cc=david@redhat.com \
    --cc=gerald.schaefer@linux.ibm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=osalvador@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.