All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Qais Yousef <qais.yousef@arm.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>
Subject: [peterz-queue:sched/core 5/8] kernel/sched/sched.h:3006:25: warning: incompatible pointer to integer conversion passing 'struct rq *' to parameter of type 'int'
Date: Thu, 27 Jan 2022 06:47:18 +0800	[thread overview]
Message-ID: <202201270632.OV8jDPXB-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core
head:   dbaafd0f1651b35e07c20e33f8c3f133fc65705e
commit: 6dd3d475cf576edd705885c66b6f1d638a6818f4 [5/8] sched/sugov: Ignore 'busy' filter when rq is capped by uclamp_max
config: x86_64-randconfig-a003 (https://download.01.org/0day-ci/archive/20220127/202201270632.OV8jDPXB-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 2a1b7aa016c0f4b5598806205bdfbab1ea2d92c4)
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/peterz/queue.git/commit/?id=6dd3d475cf576edd705885c66b6f1d638a6818f4
        git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
        git fetch --no-tags peterz-queue sched/core
        git checkout 6dd3d475cf576edd705885c66b6f1d638a6818f4
        # 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 kernel/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from kernel/sched/core.c:13:
>> kernel/sched/sched.h:3006:25: warning: incompatible pointer to integer conversion passing 'struct rq *' to parameter of type 'int' [-Wint-conversion]
           rq_util = cpu_util_cfs(rq) + cpu_util_rt(rq);
                                  ^~
   kernel/sched/sched.h:2919:46: note: passing argument to parameter 'cpu' here
   static inline unsigned long cpu_util_cfs(int cpu)
                                                ^
   kernel/sched/core.c:3454:6: warning: no previous prototype for function 'sched_set_stop_task' [-Wmissing-prototypes]
   void sched_set_stop_task(int cpu, struct task_struct *stop)
        ^
   kernel/sched/core.c:3454:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void sched_set_stop_task(int cpu, struct task_struct *stop)
   ^
   static 
   kernel/sched/core.c:1672:1: warning: unused function 'uclamp_update_active' [-Wunused-function]
   uclamp_update_active(struct task_struct *p)
   ^
   3 warnings generated.
--
   In file included from kernel/sched/loadavg.c:9:
>> kernel/sched/sched.h:3006:25: warning: incompatible pointer to integer conversion passing 'struct rq *' to parameter of type 'int' [-Wint-conversion]
           rq_util = cpu_util_cfs(rq) + cpu_util_rt(rq);
                                  ^~
   kernel/sched/sched.h:2919:46: note: passing argument to parameter 'cpu' here
   static inline unsigned long cpu_util_cfs(int cpu)
                                                ^
   1 warning generated.
--
   In file included from kernel/sched/fair.c:23:
>> kernel/sched/sched.h:3006:25: warning: incompatible pointer to integer conversion passing 'struct rq *' to parameter of type 'int' [-Wint-conversion]
           rq_util = cpu_util_cfs(rq) + cpu_util_rt(rq);
                                  ^~
   kernel/sched/sched.h:2919:46: note: passing argument to parameter 'cpu' here
   static inline unsigned long cpu_util_cfs(int cpu)
                                                ^
   kernel/sched/fair.c:8405:19: warning: unused function 'check_misfit_status' [-Wunused-function]
   static inline int check_misfit_status(struct rq *rq, struct sched_domain *sd)
                     ^
   2 warnings generated.
--
   In file included from kernel/sched/rt.c:6:
>> kernel/sched/sched.h:3006:25: warning: incompatible pointer to integer conversion passing 'struct rq *' to parameter of type 'int' [-Wint-conversion]
           rq_util = cpu_util_cfs(rq) + cpu_util_rt(rq);
                                  ^~
   kernel/sched/sched.h:2919:46: note: passing argument to parameter 'cpu' here
   static inline unsigned long cpu_util_cfs(int cpu)
                                                ^
   kernel/sched/rt.c:680:6: warning: no previous prototype for function 'sched_rt_bandwidth_account' [-Wmissing-prototypes]
   bool sched_rt_bandwidth_account(struct rt_rq *rt_rq)
        ^
   kernel/sched/rt.c:680: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 
   2 warnings generated.


vim +3006 kernel/sched/sched.h

  2996	
  2997	/* Is the rq being capped/throttled by uclamp_max? */
  2998	static inline bool uclamp_rq_is_capped(struct rq *rq)
  2999	{
  3000		unsigned long rq_util;
  3001		unsigned long max_util;
  3002	
  3003		if (!static_branch_likely(&sched_uclamp_used))
  3004			return false;
  3005	
> 3006		rq_util = cpu_util_cfs(rq) + cpu_util_rt(rq);
  3007		max_util = READ_ONCE(rq->uclamp[UCLAMP_MAX].value);
  3008	
  3009		return max_util != SCHED_CAPACITY_SCALE && rq_util >= max_util;
  3010	}
  3011	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [peterz-queue:sched/core 5/8] kernel/sched/sched.h:3006:25: warning: incompatible pointer to integer conversion passing 'struct rq *' to parameter of type 'int'
Date: Thu, 27 Jan 2022 06:47:18 +0800	[thread overview]
Message-ID: <202201270632.OV8jDPXB-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5276 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core
head:   dbaafd0f1651b35e07c20e33f8c3f133fc65705e
commit: 6dd3d475cf576edd705885c66b6f1d638a6818f4 [5/8] sched/sugov: Ignore 'busy' filter when rq is capped by uclamp_max
config: x86_64-randconfig-a003 (https://download.01.org/0day-ci/archive/20220127/202201270632.OV8jDPXB-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 2a1b7aa016c0f4b5598806205bdfbab1ea2d92c4)
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/peterz/queue.git/commit/?id=6dd3d475cf576edd705885c66b6f1d638a6818f4
        git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
        git fetch --no-tags peterz-queue sched/core
        git checkout 6dd3d475cf576edd705885c66b6f1d638a6818f4
        # 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 kernel/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from kernel/sched/core.c:13:
>> kernel/sched/sched.h:3006:25: warning: incompatible pointer to integer conversion passing 'struct rq *' to parameter of type 'int' [-Wint-conversion]
           rq_util = cpu_util_cfs(rq) + cpu_util_rt(rq);
                                  ^~
   kernel/sched/sched.h:2919:46: note: passing argument to parameter 'cpu' here
   static inline unsigned long cpu_util_cfs(int cpu)
                                                ^
   kernel/sched/core.c:3454:6: warning: no previous prototype for function 'sched_set_stop_task' [-Wmissing-prototypes]
   void sched_set_stop_task(int cpu, struct task_struct *stop)
        ^
   kernel/sched/core.c:3454:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void sched_set_stop_task(int cpu, struct task_struct *stop)
   ^
   static 
   kernel/sched/core.c:1672:1: warning: unused function 'uclamp_update_active' [-Wunused-function]
   uclamp_update_active(struct task_struct *p)
   ^
   3 warnings generated.
--
   In file included from kernel/sched/loadavg.c:9:
>> kernel/sched/sched.h:3006:25: warning: incompatible pointer to integer conversion passing 'struct rq *' to parameter of type 'int' [-Wint-conversion]
           rq_util = cpu_util_cfs(rq) + cpu_util_rt(rq);
                                  ^~
   kernel/sched/sched.h:2919:46: note: passing argument to parameter 'cpu' here
   static inline unsigned long cpu_util_cfs(int cpu)
                                                ^
   1 warning generated.
--
   In file included from kernel/sched/fair.c:23:
>> kernel/sched/sched.h:3006:25: warning: incompatible pointer to integer conversion passing 'struct rq *' to parameter of type 'int' [-Wint-conversion]
           rq_util = cpu_util_cfs(rq) + cpu_util_rt(rq);
                                  ^~
   kernel/sched/sched.h:2919:46: note: passing argument to parameter 'cpu' here
   static inline unsigned long cpu_util_cfs(int cpu)
                                                ^
   kernel/sched/fair.c:8405:19: warning: unused function 'check_misfit_status' [-Wunused-function]
   static inline int check_misfit_status(struct rq *rq, struct sched_domain *sd)
                     ^
   2 warnings generated.
--
   In file included from kernel/sched/rt.c:6:
>> kernel/sched/sched.h:3006:25: warning: incompatible pointer to integer conversion passing 'struct rq *' to parameter of type 'int' [-Wint-conversion]
           rq_util = cpu_util_cfs(rq) + cpu_util_rt(rq);
                                  ^~
   kernel/sched/sched.h:2919:46: note: passing argument to parameter 'cpu' here
   static inline unsigned long cpu_util_cfs(int cpu)
                                                ^
   kernel/sched/rt.c:680:6: warning: no previous prototype for function 'sched_rt_bandwidth_account' [-Wmissing-prototypes]
   bool sched_rt_bandwidth_account(struct rt_rq *rt_rq)
        ^
   kernel/sched/rt.c:680: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 
   2 warnings generated.


vim +3006 kernel/sched/sched.h

  2996	
  2997	/* Is the rq being capped/throttled by uclamp_max? */
  2998	static inline bool uclamp_rq_is_capped(struct rq *rq)
  2999	{
  3000		unsigned long rq_util;
  3001		unsigned long max_util;
  3002	
  3003		if (!static_branch_likely(&sched_uclamp_used))
  3004			return false;
  3005	
> 3006		rq_util = cpu_util_cfs(rq) + cpu_util_rt(rq);
  3007		max_util = READ_ONCE(rq->uclamp[UCLAMP_MAX].value);
  3008	
  3009		return max_util != SCHED_CAPACITY_SCALE && rq_util >= max_util;
  3010	}
  3011	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

             reply	other threads:[~2022-01-26 22:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-26 22:47 kernel test robot [this message]
2022-01-26 22:47 ` [peterz-queue:sched/core 5/8] kernel/sched/sched.h:3006:25: warning: incompatible pointer to integer conversion passing 'struct rq *' to parameter of type 'int' kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202201270632.OV8jDPXB-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=peterz@infradead.org \
    --cc=qais.yousef@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.