From: kernel test robot <lkp@intel.com>
To: David Hildenbrand <david@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [davidhildenbrand:large_mapcount 24/27] fs/proc/page.c:73:23: error: use of undeclared identifier 'page'; did you mean 'ppage'?
Date: Sat, 6 Apr 2024 07:14:44 +0800 [thread overview]
Message-ID: <202404060712.jTR2otML-lkp@intel.com> (raw)
tree: https://github.com/davidhildenbrand/linux large_mapcount
head: 7e8a03fbcd6b8b5a7e2b6ea60f620c5d816cb44b
commit: efed85936fb7a152c58898dce59efa55105f78f9 [24/27] fs/proc/page: expose folio_mapcount() instead of page_mapcount()
config: arm-defconfig (https://download.01.org/0day-ci/archive/20240406/202404060712.jTR2otML-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240406/202404060712.jTR2otML-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404060712.jTR2otML-lkp@intel.com/
All errors (new ones prefixed by >>):
>> fs/proc/page.c:73:23: error: use of undeclared identifier 'page'; did you mean 'ppage'?
folio = page_folio(page);
^~~~
ppage
include/linux/page-flags.h:267:35: note: expanded from macro 'page_folio'
#define page_folio(p) (_Generic((p), \
^
fs/proc/page.c:51:15: note: 'ppage' declared here
struct page *ppage;
^
>> fs/proc/page.c:73:23: error: use of undeclared identifier 'page'; did you mean 'ppage'?
folio = page_folio(page);
^~~~
ppage
include/linux/page-flags.h:268:60: note: expanded from macro 'page_folio'
const struct page *: (const struct folio *)_compound_head(p), \
^
fs/proc/page.c:51:15: note: 'ppage' declared here
struct page *ppage;
^
>> fs/proc/page.c:73:23: error: use of undeclared identifier 'page'; did you mean 'ppage'?
folio = page_folio(page);
^~~~
ppage
include/linux/page-flags.h:269:49: note: expanded from macro 'page_folio'
struct page *: (struct folio *)_compound_head(p)))
^
fs/proc/page.c:51:15: note: 'ppage' declared here
struct page *ppage;
^
>> fs/proc/page.c:74:28: error: use of undeclared identifier 'dolio'; did you mean 'folio'?
pcount = folio_mapcount(dolio);
^~~~~
folio
fs/proc/page.c:50:16: note: 'folio' declared here
struct folio *folio;
^
4 errors generated.
vim +73 fs/proc/page.c
39
40 /* /proc/kpagecount - an array exposing page counts
41 *
42 * Each entry is a u64 representing the corresponding
43 * physical page count.
44 */
45 static ssize_t kpagecount_read(struct file *file, char __user *buf,
46 size_t count, loff_t *ppos)
47 {
48 const unsigned long max_dump_pfn = get_max_dump_pfn();
49 u64 __user *out = (u64 __user *)buf;
50 struct folio *folio;
51 struct page *ppage;
52 unsigned long src = *ppos;
53 unsigned long pfn;
54 ssize_t ret = 0;
55 u64 pcount;
56
57 pfn = src / KPMSIZE;
58 if (src & KPMMASK || count & KPMMASK)
59 return -EINVAL;
60 if (src >= max_dump_pfn * KPMSIZE)
61 return 0;
62 count = min_t(unsigned long, count, (max_dump_pfn * KPMSIZE) - src);
63
64 while (count > 0) {
65 /*
66 * TODO: ZONE_DEVICE support requires to identify
67 * memmaps that were actually initialized.
68 */
69 ppage = pfn_to_online_page(pfn);
70
71 pcount = 0;
72 if (ppage) {
> 73 folio = page_folio(page);
> 74 pcount = folio_mapcount(dolio);
75 }
76
77 if (put_user(pcount, out)) {
78 ret = -EFAULT;
79 break;
80 }
81
82 pfn++;
83 out++;
84 count -= KPMSIZE;
85
86 cond_resched();
87 }
88
89 *ppos += (char __user *)out - buf;
90 if (!ret)
91 ret = (char __user *)out - buf;
92 return ret;
93 }
94
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-04-05 23:15 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=202404060712.jTR2otML-lkp@intel.com \
--to=lkp@intel.com \
--cc=david@redhat.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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.