public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [qais-yousef:improve-sched-cpufreq-interaction 1/1] kernel/sched/core.c:5169:17: error: incompatible pointer to integer conversion passing 'struct task_struct *' to parameter of type 'int'
@ 2024-05-11 19:59 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-05-11 19:59 UTC (permalink / raw)
  To: Qais Yousef; +Cc: llvm, oe-kbuild-all

tree:   https://github.com/qais-yousef/linux improve-sched-cpufreq-interaction
head:   7cf8a5268d5386ece305e160647503114338282b
commit: 7cf8a5268d5386ece305e160647503114338282b [1/1] sched: Consolidate cpufreq updates
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20240512/202405120337.tA7GEqCH-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240512/202405120337.tA7GEqCH-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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405120337.tA7GEqCH-lkp@intel.com/

All errors (new ones prefixed by >>):

>> kernel/sched/core.c:5169:17: error: incompatible pointer to integer conversion passing 'struct task_struct *' to parameter of type 'int' [-Wint-conversion]
    5169 |                 if (rt_policy(prev)) {
         |                               ^~~~
   kernel/sched/sched.h:193:33: note: passing argument to parameter 'policy' here
     193 | static inline int rt_policy(int policy)
         |                                 ^
   1 error generated.


vim +5169 kernel/sched/core.c

  5136	
  5137	static inline void update_cpufreq_ctx_switch(struct rq *rq, struct task_struct *prev)
  5138	{
  5139	#ifdef CONFIG_CPU_FREQ
  5140		/*
  5141		 * RT and DL should always send a freq update. But we can do some
  5142		 * simple checks to avoid it when we know it's not necessary.
  5143		 *
  5144		 * iowait_boost will always trigger a freq update too.
  5145		 *
  5146		 * Fair tasks will only trigger an update if the root cfs_rq has
  5147		 * decayed.
  5148		 *
  5149		 * Everything else should do nothing.
  5150		 */
  5151		switch (current->policy) {
  5152		case SCHED_NORMAL:
  5153		case SCHED_BATCH:
  5154			if (unlikely(current->in_iowait)) {
  5155				cpufreq_update_util(rq, SCHED_CPUFREQ_IOWAIT | SCHED_CPUFREQ_FORCE_UPDATE);
  5156				return;
  5157			}
  5158	
  5159	#ifdef CONFIG_SMP
  5160			if (unlikely(rq->cfs.decayed)) {
  5161				rq->cfs.decayed = false;
  5162				cpufreq_update_util(rq, 0);
  5163				return;
  5164			}
  5165	#endif
  5166			return;
  5167		case SCHED_FIFO:
  5168		case SCHED_RR:
> 5169			if (rt_policy(prev)) {
  5170	#ifdef CONFIG_UCLAMP_TASK
  5171				unsigned long curr_uclamp_min = uclamp_eff_value(current, UCLAMP_MIN);
  5172				unsigned long prev_uclamp_min = uclamp_eff_value(prev, UCLAMP_MIN);
  5173	
  5174				if (curr_uclamp_min == prev_uclamp_min)
  5175	#endif
  5176					return;
  5177			}
  5178	#ifdef CONFIG_SMP
  5179			/* Stopper task masquerades as RT */
  5180			if (unlikely(current->sched_class == &stop_sched_class))
  5181				return;
  5182	#endif
  5183			cpufreq_update_util(rq, SCHED_CPUFREQ_FORCE_UPDATE);
  5184			return;
  5185		case SCHED_DEADLINE:
  5186			if (current->dl.flags & SCHED_FLAG_SUGOV) {
  5187				/* Ignore sugov kthreads, they're responding to our requests */
  5188				return;
  5189			}
  5190			cpufreq_update_util(rq, SCHED_CPUFREQ_FORCE_UPDATE);
  5191			return;
  5192		default:
  5193			return;
  5194		}
  5195	#endif
  5196	}
  5197	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-11 20:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-11 19:59 [qais-yousef:improve-sched-cpufreq-interaction 1/1] kernel/sched/core.c:5169:17: error: incompatible pointer to integer conversion passing 'struct task_struct *' to parameter of type 'int' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox