All of lore.kernel.org
 help / color / mirror / Atom feed
* [linyunsheng:page_frag_cache_v3 12/14] include/linux/page_frag_cache.h:158:24: error: implicit declaration of function 'virt_to_page'; did you mean 'pfn_to_page'?
@ 2024-04-28  2:38 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-28  2:38 UTC (permalink / raw)
  To: Yunsheng Lin; +Cc: oe-kbuild-all

tree:   https://github.com/gestionlin/linux.git page_frag_cache_v3
head:   d4839424731dee0af1ba520ac3b177893e765399
commit: 72fcea0d811a05d5e8983f14fd6154f792054e7e [12/14] mm: page_frag: introduce prepare/probe/commit API
config: um-allyesconfig (https://download.01.org/0day-ci/archive/20240428/202404281044.3kwXWqzm-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240428/202404281044.3kwXWqzm-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/202404281044.3kwXWqzm-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   In file included from mm/page_frag_test.c:18:
   include/linux/page_frag_cache.h: In function 'page_frag_alloc_pg_prepare':
>> include/linux/page_frag_cache.h:158:24: error: implicit declaration of function 'virt_to_page'; did you mean 'pfn_to_page'? [-Werror=implicit-function-declaration]
     158 |                 page = virt_to_page(va);
         |                        ^~~~~~~~~~~~
         |                        pfn_to_page
>> include/linux/page_frag_cache.h:158:22: warning: assignment to 'struct page *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     158 |                 page = virt_to_page(va);
         |                      ^
   include/linux/page_frag_cache.h: In function 'page_frag_alloc_prepare':
   include/linux/page_frag_cache.h:187:22: warning: assignment to 'struct page *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     187 |                 page = virt_to_page(*va);
         |                      ^
   include/linux/page_frag_cache.h: In function 'page_frag_alloc_probe':
   include/linux/page_frag_cache.h:210:14: warning: assignment to 'struct page *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     210 |         page = virt_to_page(*va);
         |              ^
   cc1: some warnings being treated as errors


vim +158 include/linux/page_frag_cache.h

   136	
   137	static inline struct page *page_frag_alloc_pg_prepare(struct page_frag_cache *nc,
   138							      unsigned int *offset,
   139							      unsigned int *fragsz,
   140							      gfp_t gfp)
   141	{
   142		struct page *page;
   143		unsigned int size;
   144		void *va;
   145	
   146		size = nc->size;
   147		if (unlikely(*fragsz > size)) {
   148			if (WARN_ON_ONCE(*fragsz > PAGE_SIZE)) {
   149				*fragsz = 0;
   150				return NULL;
   151			}
   152	
   153			page = __page_frag_cache_refill(nc, gfp);
   154			size = nc->size;
   155			va = nc->va;
   156		} else {
   157			va = nc->va;
 > 158			page = virt_to_page(va);
   159		}
   160	
   161		*offset = page_frag_cache_page_offset(va, size);
   162		*fragsz = size;
   163	
   164		return page;
   165	}
   166	

-- 
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-28  2:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-28  2:38 [linyunsheng:page_frag_cache_v3 12/14] include/linux/page_frag_cache.h:158:24: error: implicit declaration of function 'virt_to_page'; did you mean 'pfn_to_page'? 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.