All of lore.kernel.org
 help / color / mirror / Atom feed
* [davidhildenbrand:large_mapcount 24/27] fs/proc/page.c:73:23: error: use of undeclared identifier 'page'; did you mean 'ppage'?
@ 2024-04-05 23:14 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-05 23:14 UTC (permalink / raw)
  To: David Hildenbrand; +Cc: llvm, oe-kbuild-all

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-05 23:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-05 23:14 [davidhildenbrand:large_mapcount 24/27] fs/proc/page.c:73:23: error: use of undeclared identifier 'page'; did you mean 'ppage'? kernel test robot

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.