[vireshk-pm:opp/config 10/33] include/linux/pm_opp.h:459:9: warning: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int'

From: kernel test robot
Date: Wed May 25 2022 - 13:44:52 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git opp/config
head: d730dc101c586defb49eeafd8eea9b7bb0baa01b
commit: a23b86fb0614c769679169402c09ebcd07dbb22f [10/33] OPP: Add dev_pm_opp_set_config() and friends
config: mips-randconfig-r014-20220524 (https://download.01.org/0day-ci/archive/20220526/202205260150.ezjPkAEK-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d52a6e75b0c402c7f3b42a2b1b2873f151220947)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git/commit/?id=a23b86fb0614c769679169402c09ebcd07dbb22f
git remote add vireshk-pm https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git
git fetch --no-tags vireshk-pm opp/config
git checkout a23b86fb0614c769679169402c09ebcd07dbb22f
# 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=mips SHELL=/bin/bash kernel/sched/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

In file included from kernel/sched/core.c:81:
In file included from kernel/sched/sched.h:30:
In file included from include/linux/cpufreq.h:19:
>> include/linux/pm_opp.h:459:9: warning: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion]
return ERR_PTR(-EOPNOTSUPP);
^~~~~~~~~~~~~~~~~~~~
kernel/sched/core.c:5235:20: warning: no previous prototype for function 'task_sched_runtime' [-Wmissing-prototypes]
unsigned long long task_sched_runtime(struct task_struct *p)
^
kernel/sched/core.c:5235:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
unsigned long long task_sched_runtime(struct task_struct *p)
^
static
kernel/sched/core.c:6487:35: warning: no previous prototype for function 'schedule_user' [-Wmissing-prototypes]
asmlinkage __visible void __sched schedule_user(void)
^
kernel/sched/core.c:6487:22: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage __visible void __sched schedule_user(void)
^
static
kernel/sched/core.c:9420:13: warning: no previous prototype for function 'sched_init_smp' [-Wmissing-prototypes]
void __init sched_init_smp(void)
^
kernel/sched/core.c:9420:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init sched_init_smp(void)
^
static
kernel/sched/core.c:9448:13: warning: no previous prototype for function 'sched_init' [-Wmissing-prototypes]
void __init sched_init(void)
^
kernel/sched/core.c:9448:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init sched_init(void)
^
static
kernel/sched/core.c:3574:20: warning: unused function 'rq_has_pinned_tasks' [-Wunused-function]
static inline bool rq_has_pinned_tasks(struct rq *rq)
^
kernel/sched/core.c:5502:20: warning: unused function 'sched_tick_start' [-Wunused-function]
static inline void sched_tick_start(int cpu) { }
^
kernel/sched/core.c:5503:20: warning: unused function 'sched_tick_stop' [-Wunused-function]
static inline void sched_tick_stop(int cpu) { }
^
kernel/sched/core.c:6191:20: warning: unused function 'sched_core_cpu_starting' [-Wunused-function]
static inline void sched_core_cpu_starting(unsigned int cpu) {}
^
kernel/sched/core.c:6192:20: warning: unused function 'sched_core_cpu_deactivate' [-Wunused-function]
static inline void sched_core_cpu_deactivate(unsigned int cpu) {}
^
kernel/sched/core.c:6193:20: warning: unused function 'sched_core_cpu_dying' [-Wunused-function]
static inline void sched_core_cpu_dying(unsigned int cpu) {}
^
11 warnings generated.
--
In file included from kernel/sched/fair.c:53:
In file included from kernel/sched/sched.h:30:
In file included from include/linux/cpufreq.h:19:
>> include/linux/pm_opp.h:459:9: warning: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion]
return ERR_PTR(-EOPNOTSUPP);
^~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:663:5: warning: no previous prototype for function 'sched_update_scaling' [-Wmissing-prototypes]
int sched_update_scaling(void)
^
kernel/sched/fair.c:663:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int sched_update_scaling(void)
^
static
kernel/sched/fair.c:2979:20: warning: unused function 'account_numa_enqueue' [-Wunused-function]
static inline void account_numa_enqueue(struct rq *rq, struct task_struct *p)
^
kernel/sched/fair.c:2983:20: warning: unused function 'account_numa_dequeue' [-Wunused-function]
static inline void account_numa_dequeue(struct rq *rq, struct task_struct *p)
^
kernel/sched/fair.c:2987:20: warning: unused function 'update_scan_period' [-Wunused-function]
static inline void update_scan_period(struct task_struct *p, int new_cpu)
^
kernel/sched/fair.c:4189:20: warning: unused function 'cfs_rq_is_decayed' [-Wunused-function]
static inline bool cfs_rq_is_decayed(struct cfs_rq *cfs_rq)
^
kernel/sched/fair.c:5524:19: warning: unused function 'throttled_lb_pair' [-Wunused-function]
static inline int throttled_lb_pair(struct task_group *tg,
^
kernel/sched/fair.c:5541:20: warning: unused function 'update_runtime_enabled' [-Wunused-function]
static inline void update_runtime_enabled(struct rq *rq) {}
^
kernel/sched/fair.c:5542:20: warning: unused function 'unthrottle_offline_cfs_rqs' [-Wunused-function]
static inline void unthrottle_offline_cfs_rqs(struct rq *rq) {}
^
9 warnings generated.
--
In file included from kernel/sched/build_policy.c:33:
In file included from kernel/sched/sched.h:30:
In file included from include/linux/cpufreq.h:19:
>> include/linux/pm_opp.h:459:9: warning: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion]
return ERR_PTR(-EOPNOTSUPP);
^~~~~~~~~~~~~~~~~~~~
In file included from kernel/sched/build_policy.c:43:
kernel/sched/rt.c:666: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:666: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.
--
In file included from kernel/sched/build_utility.c:21:
In file included from include/linux/cpufreq.h:19:
>> include/linux/pm_opp.h:459:9: warning: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion]
return ERR_PTR(-EOPNOTSUPP);
^~~~~~~~~~~~~~~~~~~~
1 warning generated.


vim +459 include/linux/pm_opp.h

456
457 static inline int devm_pm_opp_set_config(struct device *dev, struct dev_pm_opp_config *config)
458 {
> 459 return ERR_PTR(-EOPNOTSUPP);
460 }
461

--
0-DAY CI Kernel Test Service
https://01.org/lkp