[openeuler:OLK-6.6 2051/2051] kernel/sched/core.c:11516:4: warning: format specifies type 'unsigned long long' but the argument has type 'int'

Hi Hui, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 6f6f173b2b8fa65e1ef7ebc6e43b0b02c2a52759 commit: 6eb07f9925a906d81f328c808ba25f7800888dce [2051/2051] sched: Introduce smart grid scheduling strategy for cfs config: arm64-randconfig-r061-20250323 (https://download.01.org/0day-ci/archive/20250323/202503231038.JR2kOoEd-lkp@i...) compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250323/202503231038.JR2kOoEd-lkp@i...) 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/202503231038.JR2kOoEd-lkp@intel.com/ All warnings (new ones prefixed by >>): kernel/sched/core.c:11374:5: warning: no previous prototype for function 'tg_set_dynamic_affinity_mode' [-Wmissing-prototypes] int tg_set_dynamic_affinity_mode(struct task_group *tg, u64 mode) ^ kernel/sched/core.c:11374:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int tg_set_dynamic_affinity_mode(struct task_group *tg, u64 mode) ^ static kernel/sched/core.c:11415:5: warning: no previous prototype for function 'tg_set_affinity_period' [-Wmissing-prototypes] int tg_set_affinity_period(struct task_group *tg, u64 period_ms) ^ kernel/sched/core.c:11415:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int tg_set_affinity_period(struct task_group *tg, u64 period_ms) ^ static kernel/sched/core.c:11429:5: warning: no previous prototype for function 'tg_get_affinity_period' [-Wmissing-prototypes] u64 tg_get_affinity_period(struct task_group *tg) ^ kernel/sched/core.c:11429:1: note: declare 'static' if the function is not intended to be used outside of this translation unit u64 tg_get_affinity_period(struct task_group *tg) ^ static
kernel/sched/core.c:11516:4: warning: format specifies type 'unsigned long long' but the argument has type 'int' [-Wformat] schedstat_val(ad->stay_cnt[i])); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/stats.h:100:32: note: expanded from macro 'schedstat_val' # define schedstat_val(var) 0 ^ 4 warnings generated.
vim +11516 kernel/sched/core.c 11493 11494 static int cpu_affinity_stat_show(struct seq_file *sf, void *v) 11495 { 11496 struct task_group *tg = css_tg(seq_css(sf)); 11497 struct auto_affinity *auto_affi = tg->auto_affinity; 11498 struct affinity_domain *ad; 11499 int i; 11500 11501 /* No stat when dynamic affinity disabled */ 11502 if (!dynamic_affinity_enabled()) 11503 return -EPERM; 11504 11505 if (unlikely(!auto_affi)) 11506 return -EPERM; 11507 11508 ad = &auto_affi->ad; 11509 seq_printf(sf, "period_active %d\n", auto_affi->period_active); 11510 seq_printf(sf, "dcount %d\n", ad->dcount); 11511 seq_printf(sf, "domain_mask 0x%x\n", ad->domain_mask); 11512 seq_printf(sf, "curr_level %d\n", ad->curr_level); 11513 for (i = 0; i < ad->dcount; i++) 11514 seq_printf(sf, "sd_level %d, cpu list %*pbl, stay_cnt %llu\n", 11515 i, cpumask_pr_args(ad->domains[i]), 11516 schedstat_val(ad->stay_cnt[i])); 11517 11518 return 0; 11519 } 11520 #endif /* CONFIG_QOS_SCHED_SMART_GRID */ 11521 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot