[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202203171800.i5UHGBco-lkp@intel.com>
Date: Thu, 17 Mar 2022 18:34:45 +0800
From: kernel test robot <lkp@...el.com>
To: Ingo Molnar <mingo@...nel.org>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [mingo-tip:sched/headers 111/2308] init/main.c:886:13: warning: no
previous prototype for function 'init_per_task_early'
tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head: ef90a8d1de7ff54bfd0fcfe6371c20f544b14d6d
commit: 3e2fb1b92a2026ae3608f3d77d302217390dee27 [111/2308] headers/deps: cpusets: Move task_struct::mems_allowed_seq to per_task()
config: x86_64-randconfig-a001 (https://download.01.org/0day-ci/archive/20220317/202203171800.i5UHGBco-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a6ec1e3d798f8eab43fb3a91028c6ab04e115fcb)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=3e2fb1b92a2026ae3608f3d77d302217390dee27
git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
git fetch --no-tags mingo-tip sched/headers
git checkout 3e2fb1b92a2026ae3608f3d77d302217390dee27
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
init/main.c:782:20: warning: no previous prototype for function 'mem_encrypt_init' [-Wmissing-prototypes]
void __init __weak mem_encrypt_init(void) { }
^
init/main.c:782:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init __weak mem_encrypt_init(void) { }
^
static
>> init/main.c:886:13: warning: no previous prototype for function 'init_per_task_early' [-Wmissing-prototypes]
void __init init_per_task_early(void)
^
init/main.c:886:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init init_per_task_early(void)
^
static
2 warnings generated.
vim +/init_per_task_early +886 init/main.c
781
> 782 void __init __weak mem_encrypt_init(void) { }
783
784 void __init __weak poking_init(void) { }
785
786 void __init __weak pgtable_cache_init(void) { }
787
788 void __init __weak trap_init(void) { }
789
790 bool initcall_debug;
791 core_param(initcall_debug, initcall_debug, bool, 0644);
792
793 #ifdef TRACEPOINTS_ENABLED
794 static void __init initcall_debug_enable(void);
795 #else
796 static inline void initcall_debug_enable(void)
797 {
798 }
799 #endif
800
801 /* Report memory auto-initialization states for this boot. */
802 static void __init report_meminit(void)
803 {
804 const char *stack;
805
806 if (IS_ENABLED(CONFIG_INIT_STACK_ALL_PATTERN))
807 stack = "all(pattern)";
808 else if (IS_ENABLED(CONFIG_INIT_STACK_ALL_ZERO))
809 stack = "all(zero)";
810 else if (IS_ENABLED(CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL))
811 stack = "byref_all(zero)";
812 else if (IS_ENABLED(CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF))
813 stack = "byref(zero)";
814 else if (IS_ENABLED(CONFIG_GCC_PLUGIN_STRUCTLEAK_USER))
815 stack = "__user(zero)";
816 else
817 stack = "off";
818
819 pr_info("mem auto-init: stack:%s, heap alloc:%s, heap free:%s\n",
820 stack, want_init_on_alloc(GFP_KERNEL) ? "on" : "off",
821 want_init_on_free() ? "on" : "off");
822 if (want_init_on_free())
823 pr_info("mem auto-init: clearing system memory may take some time...\n");
824 }
825
826 /*
827 * Set up kernel memory allocators
828 */
829 static void __init mm_init(void)
830 {
831 /*
832 * page_ext requires contiguous pages,
833 * bigger than MAX_ORDER unless SPARSEMEM.
834 */
835 page_ext_init_flatmem();
836 init_mem_debugging_and_hardening();
837 kfence_alloc_pool();
838 report_meminit();
839 stack_depot_early_init();
840 mem_init();
841 mem_init_print_info();
842 kmem_cache_init();
843 /*
844 * page_owner must be initialized after buddy is ready, and also after
845 * slab is ready so that stack_depot_init() works properly
846 */
847 page_ext_init_flatmem_late();
848 kmemleak_init();
849 pgtable_init();
850 debug_objects_mem_init();
851 vmalloc_init();
852 /* Should be run before the first non-init thread is created */
853 init_espfix_bsp();
854 /* Should be run after espfix64 is set up. */
855 pti_init();
856 }
857
858 #ifdef CONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
859 DEFINE_STATIC_KEY_MAYBE_RO(CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT,
860 randomize_kstack_offset);
861 DEFINE_PER_CPU(u32, kstack_offset);
862
863 static int __init early_randomize_kstack_offset(char *buf)
864 {
865 int ret;
866 bool bool_result;
867
868 ret = kstrtobool(buf, &bool_result);
869 if (ret)
870 return ret;
871
872 if (bool_result)
873 static_branch_enable(&randomize_kstack_offset);
874 else
875 static_branch_disable(&randomize_kstack_offset);
876 return 0;
877 }
878 early_param("randomize_kstack_offset", early_randomize_kstack_offset);
879 #endif
880
881 void __init __weak arch_call_rest_init(void)
882 {
883 rest_init();
884 }
885
> 886 void __init init_per_task_early(void)
887 {
888 #ifdef CONFIG_POSIX_TIMERS
889 per_task(&init_task, posix_cputimers) = (struct posix_cputimers) __INIT_CPU_TIMERS(init_task);
890 #endif
891
---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists