From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4252320FE; Sun, 2 Jul 2023 13:26:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688304402; x=1719840402; h=date:from:to:cc:subject:message-id:mime-version; bh=K9X+f+oEdqiFH4eRPmX3PCS4bo+GSHOEfxiKn/BL+Nk=; b=EwfQAJYagfbccq8aOj1PtgZdZJ2BIsnd2eWHXT5/bv6MDC6g2if4W0RH GmTZos1HWsNMzBQ/pwGq4vOszeZlXZmL83YS3Q1B8bL6DuRCKJhXCjMlJ J2t9GsPBXYm/24LKjLUUtnttR0rYGgyaFehNC2oCKEOeURyhXs6nDtWVZ AS4ztp9ASsYjygUO/aici86Xghrpn+MldC3o3vhls8sIlo2OUQoc+zKlv ESmRfj+HvRj8o9tKPtAsjOLSIn5TgzWn+o0l0BH+nwI9b95YS1KHC3CdS ZN19VvllI+zT8y8/T5m12VQAu+uC38F2G/DTS+7hRyvC9CjMZhhstEWjs w==; X-IronPort-AV: E=McAfee;i="6600,9927,10759"; a="342289451" X-IronPort-AV: E=Sophos;i="6.01,176,1684825200"; d="scan'208";a="342289451" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2023 06:26:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10759"; a="808275775" X-IronPort-AV: E=Sophos;i="6.01,176,1684825200"; d="scan'208";a="808275775" Received: from lkp-server01.sh.intel.com (HELO 783282924a45) ([10.239.97.150]) by FMSMGA003.fm.intel.com with ESMTP; 02 Jul 2023 06:26:39 -0700 Received: from kbuild by 783282924a45 with local (Exim 4.96) (envelope-from ) id 1qFx67-000GfJ-0a; Sun, 02 Jul 2023 13:26:39 +0000 Date: Sun, 2 Jul 2023 21:26:09 +0800 From: kernel test robot To: Yunsheng Lin Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev Subject: [linyunsheng:vhost-page-frag 1/2] include/linux/gfp.h:316:26: error: call to undeclared function 'virt_to_head_page'; ISO C99 and later do not support implicit function declarations Message-ID: <202307022136.qa5U3GMK-lkp@intel.com> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline tree: https://github.com/gestionlin/linux.git vhost-page-frag head: 43d9a865a0a23c03923aae2db7a33d78be36c595 commit: 53f6f24c5ff57ba7933cab95bb643d725484ea38 [1/2] net: introduce page_frag_cache_drain() config: x86_64-randconfig-r006-20230702 (https://download.01.org/0day-ci/archive/20230702/202307022136.qa5U3GMK-lkp@intel.com/config) compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a) reproduce: (https://download.01.org/0day-ci/archive/20230702/202307022136.qa5U3GMK-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 | Closes: https://lore.kernel.org/oe-kbuild-all/202307022136.qa5U3GMK-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from arch/x86/kernel/asm-offsets.c:9: In file included from include/linux/crypto.h:17: In file included from include/linux/slab.h:15: >> include/linux/gfp.h:316:26: error: call to undeclared function 'virt_to_head_page'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] __page_frag_cache_drain(virt_to_head_page(nc->va), nc->pagecnt_bias); ^ >> include/linux/gfp.h:316:26: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'struct page *' [-Wint-conversion] __page_frag_cache_drain(virt_to_head_page(nc->va), nc->pagecnt_bias); ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/gfp.h:306:50: note: passing argument to parameter 'page' here extern void __page_frag_cache_drain(struct page *page, unsigned int count); ^ In file included from arch/x86/kernel/asm-offsets.c:14: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:97:11: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds] return (set->sig[3] | set->sig[2] | ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/x86/kernel/asm-offsets.c:14: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:97:25: warning: array index 2 is past the end of the array (which contains 1 element) [-Warray-bounds] return (set->sig[3] | set->sig[2] | ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/x86/kernel/asm-offsets.c:14: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:98:4: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds] set->sig[1] | set->sig[0]) == 0; ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/x86/kernel/asm-offsets.c:14: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:100:11: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds] return (set->sig[1] | set->sig[0]) == 0; ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/x86/kernel/asm-offsets.c:14: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:113:11: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds] return (set1->sig[3] == set2->sig[3]) && ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/x86/kernel/asm-offsets.c:14: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:113:27: warning: array index 3 is past the end of the array (which contains 1 element) [-Warray-bounds] return (set1->sig[3] == set2->sig[3]) && ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/x86/kernel/asm-offsets.c:14: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:17: -- In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:186:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds] _SIG_SET_OP(signotset, _sig_not) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/signal.h:176:27: note: expanded from macro '_SIG_SET_OP' case 2: set->sig[1] = op(set->sig[1]); \ ^ ~ include/linux/signal.h:185:24: note: expanded from macro '_sig_not' #define _sig_not(x) (~(x)) ^ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/x86/kernel/asm-offsets.c:14: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:186:1: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds] _SIG_SET_OP(signotset, _sig_not) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/signal.h:176:10: note: expanded from macro '_SIG_SET_OP' case 2: set->sig[1] = op(set->sig[1]); \ ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/x86/kernel/asm-offsets.c:14: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:197:10: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds] case 2: set->sig[1] = 0; ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/x86/kernel/asm-offsets.c:14: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:210:10: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds] case 2: set->sig[1] = -1; ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/x86/kernel/asm-offsets.c:14: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:241:10: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds] case 2: set->sig[1] = 0; ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/x86/kernel/asm-offsets.c:14: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:13: In file included from include/linux/cgroup.h:17: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:254:10: warning: array index 1 is past the end of the array (which contains 1 element) [-Warray-bounds] case 2: set->sig[1] = -1; ^ ~ arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/x86/kernel/asm-offsets.c:14: In file included from include/linux/suspend.h:5: In file included from include/linux/swap.h:9: In file included from include/linux/memcontrol.h:20: >> include/linux/mm.h:1169:28: error: static declaration of 'virt_to_head_page' follows non-static declaration static inline struct page *virt_to_head_page(const void *x) ^ include/linux/gfp.h:316:26: note: previous implicit declaration is here __page_frag_cache_drain(virt_to_head_page(nc->va), nc->pagecnt_bias); ^ 49 warnings and 3 errors generated. make[2]: *** [scripts/Makefile.build:114: arch/x86/kernel/asm-offsets.s] Error 1 shuffle=2099996146 make[2]: Target 'prepare' not remade because of errors. make[1]: *** [Makefile:1287: prepare0] Error 2 shuffle=2099996146 make[1]: Target 'prepare' not remade because of errors. make: *** [Makefile:226: __sub-make] Error 2 shuffle=2099996146 make: Target 'prepare' not remade because of errors. vim +/virt_to_head_page +316 include/linux/gfp.h 304 305 struct page_frag_cache; 306 extern void __page_frag_cache_drain(struct page *page, unsigned int count); 307 extern void *page_frag_alloc_align(struct page_frag_cache *nc, 308 unsigned int fragsz, gfp_t gfp_mask, 309 unsigned int align_mask); 310 311 static inline void page_frag_cache_drain(struct page_frag_cache *nc) 312 { 313 if (!nc->va) 314 return; 315 > 316 __page_frag_cache_drain(virt_to_head_page(nc->va), nc->pagecnt_bias); 317 nc->va = NULL; 318 } 319 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki