From: kernel test robot <lkp@intel.com>
To: steven@liquorix.net
Cc: oe-kbuild-all@lists.linux.dev
Subject: [zen:6.2/prjc 303/395] kernel/sched/alt_core.c:5782: warning: expecting prototype for sys_sched_getscheduler(). Prototype was for sys_sched_getparam() instead
Date: Sun, 30 Apr 2023 04:35:44 +0800 [thread overview]
Message-ID: <202304300405.eRp0JeAX-lkp@intel.com> (raw)
Hi Alfred,
FYI, the error/warning still remains.
tree: https://github.com/zen-kernel/zen-kernel 6.2/prjc
head: 6a80d978aa1f981122f7478fedea389aa9475f9d
commit: 5dbca3a371400fe69ad2177b7a6c9d6436dd1fa0 [303/395] sched/alt: [Sync] f5d39b020809 freezer,sched: Rewrite core freezer logic
config: hexagon-randconfig-r041-20230430 (https://download.01.org/0day-ci/archive/20230430/202304300405.eRp0JeAX-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 437b7602e4a998220871de78afcb020b9c14a661)
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://github.com/zen-kernel/zen-kernel/commit/5dbca3a371400fe69ad2177b7a6c9d6436dd1fa0
git remote add zen https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen 6.2/prjc
git checkout 5dbca3a371400fe69ad2177b7a6c9d6436dd1fa0
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash kernel/sched/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304300405.eRp0JeAX-lkp@intel.com/
All warnings (new ones prefixed by >>):
kernel/sched/alt_core.c:114: warning: cannot understand function prototype: 'int sched_yield_type __read_mostly = 1; '
kernel/sched/alt_core.c:3455: warning: Function parameter or member 'prev' not described in 'prepare_task_switch'
kernel/sched/alt_core.c:3488: warning: Excess function parameter 'rq' description in 'finish_task_switch'
kernel/sched/alt_core.c:5714: warning: Function parameter or member 'flags' not described in 'sys_sched_setattr'
>> kernel/sched/alt_core.c:5782: warning: expecting prototype for sys_sched_getscheduler(). Prototype was for sys_sched_getparam() instead
vim +5782 kernel/sched/alt_core.c
8b025fc742d760 Alfred Chen 2019-08-19 5772
8b025fc742d760 Alfred Chen 2019-08-19 5773 /**
8b025fc742d760 Alfred Chen 2019-08-19 5774 * sys_sched_getscheduler - get the RT priority of a thread
8b025fc742d760 Alfred Chen 2019-08-19 5775 * @pid: the pid in question.
8b025fc742d760 Alfred Chen 2019-08-19 5776 * @param: structure containing the RT priority.
8b025fc742d760 Alfred Chen 2019-08-19 5777 *
8b025fc742d760 Alfred Chen 2019-08-19 5778 * Return: On success, 0 and the RT priority is in @param. Otherwise, an error
8b025fc742d760 Alfred Chen 2019-08-19 5779 * code.
8b025fc742d760 Alfred Chen 2019-08-19 5780 */
8b025fc742d760 Alfred Chen 2019-08-19 5781 SYSCALL_DEFINE2(sched_getparam, pid_t, pid, struct sched_param __user *, param)
8b025fc742d760 Alfred Chen 2019-08-19 @5782 {
8b025fc742d760 Alfred Chen 2019-08-19 5783 struct sched_param lp = { .sched_priority = 0 };
8b025fc742d760 Alfred Chen 2019-08-19 5784 struct task_struct *p;
8b025fc742d760 Alfred Chen 2019-08-19 5785 int retval = -EINVAL;
8b025fc742d760 Alfred Chen 2019-08-19 5786
8b025fc742d760 Alfred Chen 2019-08-19 5787 if (!param || pid < 0)
8b025fc742d760 Alfred Chen 2019-08-19 5788 goto out_nounlock;
8b025fc742d760 Alfred Chen 2019-08-19 5789
8b025fc742d760 Alfred Chen 2019-08-19 5790 rcu_read_lock();
8b025fc742d760 Alfred Chen 2019-08-19 5791 p = find_process_by_pid(pid);
8b025fc742d760 Alfred Chen 2019-08-19 5792 retval = -ESRCH;
8b025fc742d760 Alfred Chen 2019-08-19 5793 if (!p)
8b025fc742d760 Alfred Chen 2019-08-19 5794 goto out_unlock;
8b025fc742d760 Alfred Chen 2019-08-19 5795
8b025fc742d760 Alfred Chen 2019-08-19 5796 retval = security_task_getscheduler(p);
8b025fc742d760 Alfred Chen 2019-08-19 5797 if (retval)
8b025fc742d760 Alfred Chen 2019-08-19 5798 goto out_unlock;
8b025fc742d760 Alfred Chen 2019-08-19 5799
8b025fc742d760 Alfred Chen 2019-08-19 5800 if (task_has_rt_policy(p))
8b025fc742d760 Alfred Chen 2019-08-19 5801 lp.sched_priority = p->rt_priority;
8b025fc742d760 Alfred Chen 2019-08-19 5802 rcu_read_unlock();
8b025fc742d760 Alfred Chen 2019-08-19 5803
8b025fc742d760 Alfred Chen 2019-08-19 5804 /*
8b025fc742d760 Alfred Chen 2019-08-19 5805 * This one might sleep, we cannot do it with a spinlock held ...
8b025fc742d760 Alfred Chen 2019-08-19 5806 */
8b025fc742d760 Alfred Chen 2019-08-19 5807 retval = copy_to_user(param, &lp, sizeof(*param)) ? -EFAULT : 0;
8b025fc742d760 Alfred Chen 2019-08-19 5808
8b025fc742d760 Alfred Chen 2019-08-19 5809 out_nounlock:
8b025fc742d760 Alfred Chen 2019-08-19 5810 return retval;
8b025fc742d760 Alfred Chen 2019-08-19 5811
8b025fc742d760 Alfred Chen 2019-08-19 5812 out_unlock:
8b025fc742d760 Alfred Chen 2019-08-19 5813 rcu_read_unlock();
8b025fc742d760 Alfred Chen 2019-08-19 5814 return retval;
8b025fc742d760 Alfred Chen 2019-08-19 5815 }
8b025fc742d760 Alfred Chen 2019-08-19 5816
:::::: The code at line 5782 was first introduced by commit
:::::: 8b025fc742d76091232a7404a7ad09c8cad61492 Project C v5.7.5-r2
:::::: TO: Alfred Chen <cchalpha@gmail.com>
:::::: CC: Alfred Chen <cchalpha@gmail.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
reply other threads:[~2023-04-29 20:36 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=202304300405.eRp0JeAX-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=steven@liquorix.net \
/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.