From: kernel test robot <lkp@intel.com>
To: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [chunkuang-hu:pagecaller 3/3] mm/vmstat.c:1548:30: warning: unused variable 'symbol'
Date: Thu, 14 Jul 2022 11:23:56 +0800 [thread overview]
Message-ID: <202207141128.kaFVoGy9-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git pagecaller
head: 7b43af7f4b48c1abb6df811dbaa644a0c7800366
commit: 7b43af7f4b48c1abb6df811dbaa644a0c7800366 [3/3] mm: vmstat: add pagecaller information
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220714/202207141128.kaFVoGy9-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/commit/?id=7b43af7f4b48c1abb6df811dbaa644a0c7800366
git remote add chunkuang-hu https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git
git fetch --no-tags chunkuang-hu pagecaller
git checkout 7b43af7f4b48c1abb6df811dbaa644a0c7800366
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
mm/vmstat.c: In function 'dump_pagecaller':
mm/vmstat.c:1548:37: error: 'KSYM_SYMBOL_LEN' undeclared (first use in this function)
1548 | char symbol[KSYM_SYMBOL_LEN];
| ^~~~~~~~~~~~~~~
mm/vmstat.c:1548:37: note: each undeclared identifier is reported only once for each function it appears in
mm/vmstat.c:1549:25: error: implicit declaration of function 'kallsyms_lookup' [-Werror=implicit-function-declaration]
1549 | kallsyms_lookup(pagecaller[i], NULL, NULL, NULL, symbol);
| ^~~~~~~~~~~~~~~
>> mm/vmstat.c:1548:30: warning: unused variable 'symbol' [-Wunused-variable]
1548 | char symbol[KSYM_SYMBOL_LEN];
| ^~~~~~
cc1: some warnings being treated as errors
vim +/symbol +1548 mm/vmstat.c
1531
1532 static void dump_pagecaller(struct seq_file *m)
1533 {
1534 unsigned long i;
1535
1536 seq_printf(m, "max_pfn = %lu\n", max_pfn);
1537 seq_printf(m, "pagecaller_nr = %lu\n", pagecaller_nr);
1538
1539 for (i = 0; i < pagecaller_nr; i++)
1540 if (pagecaller[i] == 0) {
1541 seq_printf(m, "0x%016lx %16lu [Free memory]\n",
1542 pagecaller[i], pagecaller_cnt[i] * 4);
1543 } else if (pagecaller[i] == 0xffffffffffffffff) {
1544 seq_printf(m, "0x%016lx %16lu [Reserved memory]\n",
1545 pagecaller[i], pagecaller_cnt[i] * 4);
1546 } else {
1547 #ifdef CONFIG_KALLSYMS
> 1548 char symbol[KSYM_SYMBOL_LEN];
1549 kallsyms_lookup(pagecaller[i], NULL, NULL, NULL, symbol);
1550 seq_printf(m, "0x%016lx %16lu %s\n", pagecaller[i],
1551 pagecaller_cnt[i] * 4, symbol);
1552 #else
1553 seq_printf(m, "0x%016lx %16lu\n", pagecaller[i],
1554 pagecaller_cnt[i] * 4);
1555 #endif
1556 }
1557 }
1558
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-07-14 3:25 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=202207141128.kaFVoGy9-lkp@intel.com \
--to=lkp@intel.com \
--cc=chunkuang.hu@kernel.org \
--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