[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202110121312.AAlEiy7c-lkp@intel.com>
Date: Tue, 12 Oct 2021 13:18:21 +0800
From: kernel test robot <lkp@...el.com>
To: Yafang Shao <laoar.shao@...il.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org, x86@...nel.org
Subject: [tip:sched/core 17/47] kernel/sched/rt.c:1292:22: error: variable
'p' set but not used
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core
head: b2d5b9cec60fecc72a13191c2c6c05acf60975a5
commit: 57a5c2dafca8e3ce4f70e975a9c7727b66b5071f [17/47] sched/rt: Support schedstats for RT sched class
config: hexagon-buildonly-randconfig-r002-20211012 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dcf39554dbea780d6cb7e12239451ba47a2668)
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/tip/tip.git/commit/?id=57a5c2dafca8e3ce4f70e975a9c7727b66b5071f
git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
git fetch --no-tags tip sched/core
git checkout 57a5c2dafca8e3ce4f70e975a9c7727b66b5071f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
kernel/sched/rt.c:669:6: error: no previous prototype for function 'sched_rt_bandwidth_account' [-Werror,-Wmissing-prototypes]
bool sched_rt_bandwidth_account(struct rt_rq *rt_rq)
^
kernel/sched/rt.c:669:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool sched_rt_bandwidth_account(struct rt_rq *rt_rq)
^
static
>> kernel/sched/rt.c:1292:22: error: variable 'p' set but not used [-Werror,-Wunused-but-set-variable]
struct task_struct *p = NULL;
^
kernel/sched/rt.c:1311:22: error: variable 'p' set but not used [-Werror,-Wunused-but-set-variable]
struct task_struct *p = NULL;
^
kernel/sched/rt.c:1341:22: error: variable 'p' set but not used [-Werror,-Wunused-but-set-variable]
struct task_struct *p = NULL;
^
4 errors generated.
vim +/p +1292 kernel/sched/rt.c
1287
1288 static inline void
1289 update_stats_wait_start_rt(struct rt_rq *rt_rq, struct sched_rt_entity *rt_se)
1290 {
1291 struct sched_statistics *stats;
> 1292 struct task_struct *p = NULL;
1293
1294 if (!schedstat_enabled())
1295 return;
1296
1297 if (rt_entity_is_task(rt_se))
1298 p = rt_task_of(rt_se);
1299
1300 stats = __schedstats_from_rt_se(rt_se);
1301 if (!stats)
1302 return;
1303
1304 __update_stats_wait_start(rq_of_rt_rq(rt_rq), p, stats);
1305 }
1306
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (34266 bytes)
Powered by blists - more mailing lists