mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Qi Xi <xiqi2@huawei.com>,
	kernel@openeuler.org, bobo.shaobowang@huawei.com,
	mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
	vschneid@redhat.com, patrick.bellasi@arm.com, mkoutny@suse.com,
	tj@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched: Fix compile warning about variable 'uclamp_mutex'
Date: Sat, 26 Oct 2024 06:19:12 +0800	[thread overview]
Message-ID: <202410260638.VpY4j0AB-lkp@intel.com> (raw)
In-Reply-To: <20241025034740.546570-1-xiqi2@huawei.com>

Hi Qi,

kernel test robot noticed the following build errors:

[auto build test ERROR on tip/sched/core]
[also build test ERROR on linus/master v6.12-rc4 next-20241025]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Qi-Xi/sched-Fix-compile-warning-about-variable-uclamp_mutex/20241025-115315
base:   tip/sched/core
patch link:    https://lore.kernel.org/r/20241025034740.546570-1-xiqi2%40huawei.com
patch subject: [PATCH] sched: Fix compile warning about variable 'uclamp_mutex'
config: i386-randconfig-053-20241026 (https://download.01.org/0day-ci/archive/20241026/202410260638.VpY4j0AB-lkp@intel.com/config)
compiler: clang version 19.1.2 (https://github.com/llvm/llvm-project 7ba7d8e2f7b6445b60679da826210cdde29eaf8b)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241026/202410260638.VpY4j0AB-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/202410260638.VpY4j0AB-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from kernel/sched/core.c:10:
   In file included from include/linux/highmem.h:8:
   In file included from include/linux/cacheflush.h:5:
   In file included from arch/x86/include/asm/cacheflush.h:5:
   In file included from include/linux/mm.h:2213:
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> kernel/sched/core.c:1865:16: error: use of undeclared identifier 'uclamp_mutex'; did you mean 'uclamp_none'?
    1865 |         guard(mutex)(&uclamp_mutex);
         |                       ^~~~~~~~~~~~
         |                       uclamp_none
   kernel/sched/sched.h:3377:28: note: 'uclamp_none' declared here
    3377 | static inline unsigned int uclamp_none(enum uclamp_id clamp_id)
         |                            ^
   1 warning and 1 error generated.


vim +1865 kernel/sched/core.c

494dcdf46e5cde YueHaibing        2022-04-27  1857  
78eb4ea25cd5fd Joel Granados     2024-07-24  1858  static int sysctl_sched_uclamp_handler(const struct ctl_table *table, int write,
32927393dc1ccd Christoph Hellwig 2020-04-24  1859  				void *buffer, size_t *lenp, loff_t *ppos)
e8f14172c6b11e Patrick Bellasi   2019-06-21  1860  {
7274a5c1bbec45 Patrick Bellasi   2019-08-22  1861  	bool update_root_tg = false;
13685c4a08fca9 Qais Yousef       2020-07-16  1862  	int old_min, old_max, old_min_rt;
e8f14172c6b11e Patrick Bellasi   2019-06-21  1863  	int result;
e8f14172c6b11e Patrick Bellasi   2019-06-21  1864  
0f92cdf36f848f Peter Zijlstra    2023-08-01 @1865  	guard(mutex)(&uclamp_mutex);
0f92cdf36f848f Peter Zijlstra    2023-08-01  1866  
e8f14172c6b11e Patrick Bellasi   2019-06-21  1867  	old_min = sysctl_sched_uclamp_util_min;
e8f14172c6b11e Patrick Bellasi   2019-06-21  1868  	old_max = sysctl_sched_uclamp_util_max;
13685c4a08fca9 Qais Yousef       2020-07-16  1869  	old_min_rt = sysctl_sched_uclamp_util_min_rt_default;
e8f14172c6b11e Patrick Bellasi   2019-06-21  1870  
e8f14172c6b11e Patrick Bellasi   2019-06-21  1871  	result = proc_dointvec(table, write, buffer, lenp, ppos);
e8f14172c6b11e Patrick Bellasi   2019-06-21  1872  	if (result)
e8f14172c6b11e Patrick Bellasi   2019-06-21  1873  		goto undo;
e8f14172c6b11e Patrick Bellasi   2019-06-21  1874  	if (!write)
0f92cdf36f848f Peter Zijlstra    2023-08-01  1875  		return 0;
e8f14172c6b11e Patrick Bellasi   2019-06-21  1876  
e8f14172c6b11e Patrick Bellasi   2019-06-21  1877  	if (sysctl_sched_uclamp_util_min > sysctl_sched_uclamp_util_max ||
13685c4a08fca9 Qais Yousef       2020-07-16  1878  	    sysctl_sched_uclamp_util_max > SCHED_CAPACITY_SCALE	||
13685c4a08fca9 Qais Yousef       2020-07-16  1879  	    sysctl_sched_uclamp_util_min_rt_default > SCHED_CAPACITY_SCALE) {
13685c4a08fca9 Qais Yousef       2020-07-16  1880  
e8f14172c6b11e Patrick Bellasi   2019-06-21  1881  		result = -EINVAL;
e8f14172c6b11e Patrick Bellasi   2019-06-21  1882  		goto undo;
e8f14172c6b11e Patrick Bellasi   2019-06-21  1883  	}
e8f14172c6b11e Patrick Bellasi   2019-06-21  1884  
e8f14172c6b11e Patrick Bellasi   2019-06-21  1885  	if (old_min != sysctl_sched_uclamp_util_min) {
e8f14172c6b11e Patrick Bellasi   2019-06-21  1886  		uclamp_se_set(&uclamp_default[UCLAMP_MIN],
a509a7cd797470 Patrick Bellasi   2019-06-21  1887  			      sysctl_sched_uclamp_util_min, false);
7274a5c1bbec45 Patrick Bellasi   2019-08-22  1888  		update_root_tg = true;
e8f14172c6b11e Patrick Bellasi   2019-06-21  1889  	}
e8f14172c6b11e Patrick Bellasi   2019-06-21  1890  	if (old_max != sysctl_sched_uclamp_util_max) {
e8f14172c6b11e Patrick Bellasi   2019-06-21  1891  		uclamp_se_set(&uclamp_default[UCLAMP_MAX],
a509a7cd797470 Patrick Bellasi   2019-06-21  1892  			      sysctl_sched_uclamp_util_max, false);
7274a5c1bbec45 Patrick Bellasi   2019-08-22  1893  		update_root_tg = true;
e8f14172c6b11e Patrick Bellasi   2019-06-21  1894  	}
e8f14172c6b11e Patrick Bellasi   2019-06-21  1895  
46609ce227039f Qais Yousef       2020-06-30  1896  	if (update_root_tg) {
46609ce227039f Qais Yousef       2020-06-30  1897  		static_branch_enable(&sched_uclamp_used);
7274a5c1bbec45 Patrick Bellasi   2019-08-22  1898  		uclamp_update_root_tg();
46609ce227039f Qais Yousef       2020-06-30  1899  	}
7274a5c1bbec45 Patrick Bellasi   2019-08-22  1900  
13685c4a08fca9 Qais Yousef       2020-07-16  1901  	if (old_min_rt != sysctl_sched_uclamp_util_min_rt_default) {
13685c4a08fca9 Qais Yousef       2020-07-16  1902  		static_branch_enable(&sched_uclamp_used);
13685c4a08fca9 Qais Yousef       2020-07-16  1903  		uclamp_sync_util_min_rt_default();
13685c4a08fca9 Qais Yousef       2020-07-16  1904  	}
7274a5c1bbec45 Patrick Bellasi   2019-08-22  1905  
e8f14172c6b11e Patrick Bellasi   2019-06-21  1906  	/*
7274a5c1bbec45 Patrick Bellasi   2019-08-22  1907  	 * We update all RUNNABLE tasks only when task groups are in use.
7274a5c1bbec45 Patrick Bellasi   2019-08-22  1908  	 * Otherwise, keep it simple and do just a lazy update at each next
7274a5c1bbec45 Patrick Bellasi   2019-08-22  1909  	 * task enqueue time.
e8f14172c6b11e Patrick Bellasi   2019-06-21  1910  	 */
0f92cdf36f848f Peter Zijlstra    2023-08-01  1911  	return 0;
e8f14172c6b11e Patrick Bellasi   2019-06-21  1912  
e8f14172c6b11e Patrick Bellasi   2019-06-21  1913  undo:
e8f14172c6b11e Patrick Bellasi   2019-06-21  1914  	sysctl_sched_uclamp_util_min = old_min;
e8f14172c6b11e Patrick Bellasi   2019-06-21  1915  	sysctl_sched_uclamp_util_max = old_max;
13685c4a08fca9 Qais Yousef       2020-07-16  1916  	sysctl_sched_uclamp_util_min_rt_default = old_min_rt;
e8f14172c6b11e Patrick Bellasi   2019-06-21  1917  	return result;
e8f14172c6b11e Patrick Bellasi   2019-06-21  1918  }
494dcdf46e5cde YueHaibing        2022-04-27  1919  #endif
e8f14172c6b11e Patrick Bellasi   2019-06-21  1920  

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

      parent reply	other threads:[~2024-10-25 22:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-25  3:47 Qi Xi
2024-10-25  7:32 ` Peter Zijlstra
2024-10-25 22:08 ` kernel test robot
2024-10-25 22:19 ` kernel test robot [this message]

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=202410260638.VpY4j0AB-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bobo.shaobowang@huawei.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=kernel@openeuler.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=mkoutny@suse.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=patrick.bellasi@arm.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tj@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=xiqi2@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®