From: kernel test robot <lkp@intel.com>
To: David Hildenbrand <david@redhat.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [davidhildenbrand:single_zone 4/4] drivers/base/memory.c:648:14: warning: no previous prototype for 'early_node_zone_for_memory_block'
Date: Fri, 28 Jan 2022 03:39:00 +0800 [thread overview]
Message-ID: <202201280300.xX8fHtiK-lkp@intel.com> (raw)
tree: git://github.com/davidhildenbrand/linux single_zone
head: 176a3d535903312944f7489127f520c5494bc810
commit: 176a3d535903312944f7489127f520c5494bc810 [4/4] tmp
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220128/202201280300.xX8fHtiK-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/davidhildenbrand/linux/commit/176a3d535903312944f7489127f520c5494bc810
git remote add davidhildenbrand git://github.com/davidhildenbrand/linux
git fetch --no-tags davidhildenbrand single_zone
git checkout 176a3d535903312944f7489127f520c5494bc810
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/
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:648:14: warning: no previous prototype for 'early_node_zone_for_memory_block' [-Wmissing-prototypes]
648 | struct zone *early_node_zone_for_memory_block(int nid, struct memory_block *mem)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/early_node_zone_for_memory_block +648 drivers/base/memory.c
647
> 648 struct zone *early_node_zone_for_memory_block(int nid, struct memory_block *mem)
649 {
650 const unsigned long start_pfn = section_nr_to_pfn(mem->start_section_nr);
651 const unsigned long nr_pages = PAGES_PER_SECTION * sections_per_block;
652
653 struct zone *zone, *matching_zone = NULL;
654 pg_data_t *pgdat = NODE_DATA(nid);
655 int i;
656
657 /*
658 * This logic only works for early memory, when the applicable zones
659 * already span the memory block. We don't expect overlapping zones on
660 * a single node for early memory. So if we're told that some pfns
661 * of a node fall into this memory block, we can assume that all node
662 * zones that intersect with the memory block are actually applicable.
663 * No need to look at the memmap.
664 *
665 * Memory hot(un)plug updates the zone manually after memory
666 * onlinig/offlining succeed.
667 */
668 for (i = 0; i < MAX_NR_ZONES; i++) {
669 zone = pgdat->node_zones + i;
670 if (!populated_zone(zone))
671 continue;
672 if (!zone_intersects(zone, start_pfn, nr_pages))
673 continue;
674 if (!matching_zone) {
675 matching_zone = zone;
676 continue;
677 }
678 /* Spans multiple zones ... */
679 matching_zone = NULL;
680 break;
681 }
682 return matching_zone;
683 }
684
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
reply other threads:[~2022-01-27 19:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202201280300.xX8fHtiK-lkp@intel.com \
--to=lkp@intel.com \
--cc=david@redhat.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
/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
Powered by JetHome