oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Qais Yousef <qyousef@layalina.io>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [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'
Date: Sun, 12 May 2024 03:59:30 +0800	[thread overview]
Message-ID: <202405120337.tA7GEqCH-lkp@intel.com> (raw)

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

                 reply	other threads:[~2024-05-11 20:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202405120337.tA7GEqCH-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=qyousef@layalina.io \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).