All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 6632/9522] include/linux/pm_opp.h:458:58: warning: unused parameter 'dev'
@ 2021-08-20 19:30 ` kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2021-08-20 19:30 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: clang-built-linux, kbuild-all, Linux Memory Management List,
	Quentin Perret, Lukasz Luba

[-- Attachment #1: Type: text/plain, Size: 29306 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   86ed57fd8c93fdfaabb4f58e78455180fa7d8a84
commit: c17495b01b72b53bd290f442d39b060e015c7aea [6632/9522] cpufreq: Add callback to register with energy model
config: i386-randconfig-a016-20210820 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d9c5613e856cf2addfbf892fc4c1ce9ef9feceaa)
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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c17495b01b72b53bd290f442d39b060e015c7aea
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout c17495b01b72b53bd290f442d39b060e015c7aea
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   static inline void pm_vt_switch_unregister(struct device *dev)
                                                             ^
   In file included from drivers/gpu/drm/i915/gt/intel_llc.c:6:
   In file included from include/linux/cpufreq.h:12:
   In file included from include/linux/cpu.h:17:
   In file included from include/linux/node.h:18:
   include/linux/device.h:653:46: warning: unused parameter 'dev' [-Wunused-parameter]
   static inline int dev_to_node(struct device *dev)
                                                ^
   include/linux/device.h:657:48: warning: unused parameter 'dev' [-Wunused-parameter]
   static inline void set_dev_node(struct device *dev, int node)
                                                  ^
   include/linux/device.h:657:57: warning: unused parameter 'node' [-Wunused-parameter]
   static inline void set_dev_node(struct device *dev, int node)
                                                           ^
   In file included from drivers/gpu/drm/i915/gt/intel_llc.c:6:
   In file included from include/linux/cpufreq.h:12:
   In file included from include/linux/cpu.h:17:
   include/linux/node.h:72:48: warning: unused parameter 'nid' [-Wunused-parameter]
   static inline void node_add_cache(unsigned int nid,
                                                  ^
   include/linux/node.h:73:32: warning: unused parameter 'cache_attrs' [-Wunused-parameter]
                                     struct node_cache_attrs *cache_attrs)
                                                              ^
   include/linux/node.h:77:53: warning: unused parameter 'nid' [-Wunused-parameter]
   static inline void node_set_perf_attrs(unsigned int nid,
                                                       ^
   include/linux/node.h:78:36: warning: unused parameter 'hmem_attrs' [-Wunused-parameter]
                                          struct node_hmem_attrs *hmem_attrs,
                                                                  ^
   include/linux/node.h:79:21: warning: unused parameter 'access' [-Wunused-parameter]
                                          unsigned access)
                                                   ^
   include/linux/node.h:106:42: warning: unused parameter 'nid' [-Wunused-parameter]
   static inline void link_mem_sections(int nid, unsigned long start_pfn,
                                            ^
   include/linux/node.h:106:61: warning: unused parameter 'start_pfn' [-Wunused-parameter]
   static inline void link_mem_sections(int nid, unsigned long start_pfn,
                                                               ^
   include/linux/node.h:107:24: warning: unused parameter 'end_pfn' [-Wunused-parameter]
                                        unsigned long end_pfn,
                                                      ^
   include/linux/node.h:108:31: warning: unused parameter 'context' [-Wunused-parameter]
                                        enum meminit_context context)
                                                             ^
   include/linux/node.h:152:43: warning: unused parameter 'nid' [-Wunused-parameter]
   static inline int __register_one_node(int nid)
                                             ^
   include/linux/node.h:156:41: warning: unused parameter 'nid' [-Wunused-parameter]
   static inline int register_one_node(int nid)
                                           ^
   include/linux/node.h:160:43: warning: unused parameter 'nid' [-Wunused-parameter]
   static inline int unregister_one_node(int nid)
                                             ^
   include/linux/node.h:164:56: warning: unused parameter 'cpu' [-Wunused-parameter]
   static inline int register_cpu_under_node(unsigned int cpu, unsigned int nid)
                                                          ^
   include/linux/node.h:164:74: warning: unused parameter 'nid' [-Wunused-parameter]
   static inline int register_cpu_under_node(unsigned int cpu, unsigned int nid)
                                                                            ^
   include/linux/node.h:168:58: warning: unused parameter 'cpu' [-Wunused-parameter]
   static inline int unregister_cpu_under_node(unsigned int cpu, unsigned int nid)
                                                            ^
   include/linux/node.h:168:76: warning: unused parameter 'nid' [-Wunused-parameter]
   static inline int unregister_cpu_under_node(unsigned int cpu, unsigned int nid)
                                                                              ^
   include/linux/node.h:172:77: warning: unused parameter 'mem_blk' [-Wunused-parameter]
   static inline void unregister_memory_block_under_nodes(struct memory_block *mem_blk)
                                                                               ^
   include/linux/node.h:176:74: warning: unused parameter 'reg' [-Wunused-parameter]
   static inline void register_hugetlbfs_with_node(node_registration_func_t reg,
                                                                            ^
   include/linux/node.h:177:32: warning: unused parameter 'unreg' [-Wunused-parameter]
                                                   node_registration_func_t unreg)
                                                                            ^
   In file included from drivers/gpu/drm/i915/gt/intel_llc.c:6:
   In file included from include/linux/cpufreq.h:12:
   In file included from include/linux/cpu.h:20:
   include/linux/cpuhotplug.h:417:55: warning: unused parameter 'state' [-Wunused-parameter]
   static inline void cpuhp_online_idle(enum cpuhp_state state) { }
                                                         ^
   In file included from drivers/gpu/drm/i915/gt/intel_llc.c:6:
   In file included from include/linux/cpufreq.h:12:
   include/linux/cpu.h:111:40: warning: unused parameter 'cpu' [-Wunused-parameter]
   static inline int add_cpu(unsigned int cpu) { return 0;}
                                          ^
   include/linux/cpu.h:142:43: warning: unused parameter 'cpu' [-Wunused-parameter]
   static inline int remove_cpu(unsigned int cpu) { return -EPERM; }
                                             ^
   include/linux/cpu.h:143:59: warning: unused parameter 'primary_cpu' [-Wunused-parameter]
   static inline void smp_shutdown_nonboot_cpus(unsigned int primary_cpu) { }
                                                             ^
   include/linux/cpu.h:226:41: warning: unused parameter 'force' [-Wunused-parameter]
   static inline void cpu_smt_disable(bool force) { }
                                           ^
   include/linux/cpu.h:230:60: warning: unused parameter 'ctrlval' [-Wunused-parameter]
   static inline int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval) { return 0; }
                                                              ^
   In file included from drivers/gpu/drm/i915/gt/intel_llc.c:6:
   In file included from include/linux/cpufreq.h:17:
>> include/linux/pm_opp.h:458:58: warning: unused parameter 'dev' [-Wunused-parameter]
   static inline int dev_pm_opp_of_add_table(struct device *dev)
                                                            ^
   include/linux/pm_opp.h:463:66: warning: unused parameter 'dev' [-Wunused-parameter]
   static inline int dev_pm_opp_of_add_table_indexed(struct device *dev, int index)
                                                                    ^
>> include/linux/pm_opp.h:463:75: warning: unused parameter 'index' [-Wunused-parameter]
   static inline int dev_pm_opp_of_add_table_indexed(struct device *dev, int index)
                                                                             ^
   include/linux/pm_opp.h:468:64: warning: unused parameter 'dev' [-Wunused-parameter]
   static inline int dev_pm_opp_of_add_table_noclk(struct device *dev, int index)
                                                                  ^
   include/linux/pm_opp.h:468:73: warning: unused parameter 'index' [-Wunused-parameter]
   static inline int dev_pm_opp_of_add_table_noclk(struct device *dev, int index)
                                                                           ^
   include/linux/pm_opp.h:473:62: warning: unused parameter 'dev' [-Wunused-parameter]
   static inline void dev_pm_opp_of_remove_table(struct device *dev)
                                                                ^
   include/linux/pm_opp.h:477:59: warning: unused parameter 'dev' [-Wunused-parameter]
   static inline int devm_pm_opp_of_add_table(struct device *dev)
                                                             ^
>> include/linux/pm_opp.h:482:73: warning: unused parameter 'cpumask' [-Wunused-parameter]
   static inline int dev_pm_opp_of_cpumask_add_table(const struct cpumask *cpumask)
                                                                           ^
   include/linux/pm_opp.h:487:77: warning: unused parameter 'cpumask' [-Wunused-parameter]
   static inline void dev_pm_opp_of_cpumask_remove_table(const struct cpumask *cpumask)
                                                                               ^
>> include/linux/pm_opp.h:491:65: warning: unused parameter 'cpu_dev' [-Wunused-parameter]
   static inline int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask)
                                                                   ^
   include/linux/pm_opp.h:491:90: warning: unused parameter 'cpumask' [-Wunused-parameter]
   static inline int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask)
                                                                                            ^
   include/linux/pm_opp.h:496:82: warning: unused parameter 'dev' [-Wunused-parameter]
   static inline struct device_node *dev_pm_opp_of_get_opp_desc_node(struct device *dev)
                                                                                    ^
>> include/linux/pm_opp.h:501:77: warning: unused parameter 'opp' [-Wunused-parameter]
   static inline struct device_node *dev_pm_opp_get_of_node(struct dev_pm_opp *opp)
                                                                               ^
   include/linux/pm_opp.h:506:60: warning: unused parameter 'dev' [-Wunused-parameter]
   static inline int dev_pm_opp_of_register_em(struct device *dev,
                                                              ^
>> include/linux/pm_opp.h:507:26: warning: unused parameter 'cpus' [-Wunused-parameter]
                                               struct cpumask *cpus)
                                                               ^
   include/linux/pm_opp.h:512:63: warning: unused parameter 'dev' [-Wunused-parameter]
   static inline void dev_pm_opp_of_unregister_em(struct device *dev)
                                                                 ^
>> include/linux/pm_opp.h:516:77: warning: unused parameter 'np' [-Wunused-parameter]
   static inline int of_get_required_opp_performance_state(struct device_node *np, int index)
                                                                               ^
   include/linux/pm_opp.h:516:85: warning: unused parameter 'index' [-Wunused-parameter]
   static inline int of_get_required_opp_performance_state(struct device_node *np, int index)
                                                                                       ^
   include/linux/pm_opp.h:521:63: warning: unused parameter 'dev' [-Wunused-parameter]
   static inline int dev_pm_opp_of_find_icc_paths(struct device *dev, struct opp_table *opp_table)
                                                                 ^
>> include/linux/pm_opp.h:521:86: warning: unused parameter 'opp_table' [-Wunused-parameter]
   static inline int dev_pm_opp_of_find_icc_paths(struct device *dev, struct opp_table *opp_table)
                                                                                        ^
   In file included from drivers/gpu/drm/i915/gt/intel_llc.c:6:
   include/linux/cpufreq.h:261:70: warning: unused parameter 'policy' [-Wunused-parameter]
   static inline void cpufreq_stats_create_table(struct cpufreq_policy *policy) { }
                                                                        ^
   include/linux/cpufreq.h:262:68: warning: unused parameter 'policy' [-Wunused-parameter]
   static inline void cpufreq_stats_free_table(struct cpufreq_policy *policy) { }
                                                                      ^
   include/linux/cpufreq.h:263:75: warning: unused parameter 'policy' [-Wunused-parameter]
   static inline void cpufreq_stats_record_transition(struct cpufreq_policy *policy,
                                                                             ^
   include/linux/cpufreq.h:264:23: warning: unused parameter 'new_freq' [-Wunused-parameter]
                                                      unsigned int new_freq) { }
                                                                   ^
   include/linux/cpufreq.h:1031:73: warning: unused parameter 'policy' [-Wunused-parameter]
   static inline void sched_cpufreq_governor_change(struct cpufreq_policy *policy,
                                                                           ^
   include/linux/cpufreq.h:1032:29: warning: unused parameter 'old_gov' [-Wunused-parameter]
                           struct cpufreq_governor *old_gov) { }
                                                    ^
   include/linux/cpufreq.h:1040:48: warning: unused parameter 'cpus' [-Wunused-parameter]
   void arch_set_freq_scale(const struct cpumask *cpus,
                                                  ^
   include/linux/cpufreq.h:1041:19: warning: unused parameter 'cur_freq' [-Wunused-parameter]
                            unsigned long cur_freq,
                                          ^
   include/linux/cpufreq.h:1042:19: warning: unused parameter 'max_freq' [-Wunused-parameter]
                            unsigned long max_freq)
                                          ^
   In file included from drivers/gpu/drm/i915/gt/intel_llc.c:8:
   In file included from drivers/gpu/drm/i915/i915_drv.h:36:
   In file included from arch/x86/include/asm/hypervisor.h:37:
   In file included from arch/x86/include/asm/kvm_para.h:7:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:5:
   include/linux/context_tracking_state.h:51:53: warning: unused parameter 'cpu' [-Wunused-parameter]
   static inline bool context_tracking_enabled_cpu(int cpu) { return false; }
                                                       ^
   In file included from drivers/gpu/drm/i915/gt/intel_llc.c:8:
   In file included from drivers/gpu/drm/i915/i915_drv.h:36:
   In file included from arch/x86/include/asm/hypervisor.h:37:
   In file included from arch/x86/include/asm/kvm_para.h:7:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:10:
   include/linux/vtime.h:28:57: warning: unused parameter 'tsk' [-Wunused-parameter]
   static inline void vtime_user_enter(struct task_struct *tsk) { }
                                                           ^
   include/linux/vtime.h:29:56: warning: unused parameter 'tsk' [-Wunused-parameter]
   static inline void vtime_user_exit(struct task_struct *tsk) { }
                                                          ^
   include/linux/vtime.h:30:58: warning: unused parameter 'tsk' [-Wunused-parameter]
   static inline void vtime_guest_enter(struct task_struct *tsk) { }
                                                            ^
   include/linux/vtime.h:31:57: warning: unused parameter 'tsk' [-Wunused-parameter]
   static inline void vtime_guest_exit(struct task_struct *tsk) { }
                                                           ^
   include/linux/vtime.h:32:56: warning: unused parameter 'tsk' [-Wunused-parameter]
   static inline void vtime_init_idle(struct task_struct *tsk, int cpu) { }
                                                          ^
   include/linux/vtime.h:32:65: warning: unused parameter 'cpu' [-Wunused-parameter]
   static inline void vtime_init_idle(struct task_struct *tsk, int cpu) { }
                                                                   ^
   include/linux/vtime.h:41:58: warning: unused parameter 'tsk' [-Wunused-parameter]
   static inline void vtime_account_irq(struct task_struct *tsk, unsigned int offset) { }
                                                            ^
   include/linux/vtime.h:41:76: warning: unused parameter 'offset' [-Wunused-parameter]
   static inline void vtime_account_irq(struct task_struct *tsk, unsigned int offset) { }
                                                                              ^
   include/linux/vtime.h:42:62: warning: unused parameter 'tsk' [-Wunused-parameter]
   static inline void vtime_account_softirq(struct task_struct *tsk) { }
                                                                ^
   include/linux/vtime.h:43:62: warning: unused parameter 'tsk' [-Wunused-parameter]
   static inline void vtime_account_hardirq(struct task_struct *tsk) { }
                                                                ^
   include/linux/vtime.h:44:52: warning: unused parameter 'tsk' [-Wunused-parameter]
   static inline void vtime_flush(struct task_struct *tsk) { }
                                                      ^
   include/linux/vtime.h:117:58: warning: unused parameter 'prev' [-Wunused-parameter]
   static inline void vtime_task_switch(struct task_struct *prev) { }
                                                            ^
   include/linux/vtime.h:135:60: warning: unused parameter 'tsk' [-Wunused-parameter]
   static inline void irqtime_account_irq(struct task_struct *tsk, unsigned int offset) { }
                                                              ^
   include/linux/vtime.h:135:78: warning: unused parameter 'offset' [-Wunused-parameter]
   static inline void irqtime_account_irq(struct task_struct *tsk, unsigned int offset) { }
                                                                                ^
   In file included from drivers/gpu/drm/i915/gt/intel_llc.c:8:
   In file included from drivers/gpu/drm/i915/i915_drv.h:36:
   In file included from arch/x86/include/asm/hypervisor.h:37:
   In file included from arch/x86/include/asm/kvm_para.h:7:
   In file included from include/linux/interrupt.h:20:
   In file included from arch/x86/include/asm/sections.h:7:
   include/asm-generic/sections.h:70:53: warning: unused parameter 'addr' [-Wunused-parameter]
   static inline int arch_is_kernel_text(unsigned long addr)
                                                       ^
   include/asm-generic/sections.h:77:53: warning: unused parameter 'addr' [-Wunused-parameter]
   static inline int arch_is_kernel_data(unsigned long addr)
                                                       ^
   In file included from drivers/gpu/drm/i915/gt/intel_llc.c:8:


vim +/dev +458 include/linux/pm_opp.h

e1f60b292ffd61 include/linux/opp.h    Nishanth Menon 2010-10-13  438  
d6561bb206aae9 include/linux/opp.h    Shawn Guo      2013-02-21  439  #if defined(CONFIG_PM_OPP) && defined(CONFIG_OF)
8f8d37b2537a28 include/linux/pm_opp.h Viresh Kumar   2015-09-04  440  int dev_pm_opp_of_add_table(struct device *dev);
fa9b274f8aeffb include/linux/pm_opp.h Viresh Kumar   2017-04-26  441  int dev_pm_opp_of_add_table_indexed(struct device *dev, int index);
559fef0dfd9114 include/linux/pm_opp.h Viresh Kumar   2021-01-27  442  int dev_pm_opp_of_add_table_noclk(struct device *dev, int index);
8f8d37b2537a28 include/linux/pm_opp.h Viresh Kumar   2015-09-04  443  void dev_pm_opp_of_remove_table(struct device *dev);
3d5cfbb69508db include/linux/pm_opp.h Yangtao Li     2021-03-14  444  int devm_pm_opp_of_add_table(struct device *dev);
ddbb74bc70c0db include/linux/pm_opp.h Arnd Bergmann  2016-04-30  445  int dev_pm_opp_of_cpumask_add_table(const struct cpumask *cpumask);
ddbb74bc70c0db include/linux/pm_opp.h Arnd Bergmann  2016-04-30  446  void dev_pm_opp_of_cpumask_remove_table(const struct cpumask *cpumask);
ddbb74bc70c0db include/linux/pm_opp.h Arnd Bergmann  2016-04-30  447  int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask);
0764c604c8128f include/linux/pm_opp.h Dave Gerlach   2017-02-03  448  struct device_node *dev_pm_opp_of_get_opp_desc_node(struct device *dev);
e2f4b5f8dc59c2 include/linux/pm_opp.h Viresh Kumar   2018-01-12  449  struct device_node *dev_pm_opp_get_of_node(struct dev_pm_opp *opp);
2feb5a896c42fb include/linux/pm_opp.h Viresh Kumar   2018-12-14  450  int of_get_required_opp_performance_state(struct device_node *np, int index);
6d3f922c46f2e9 include/linux/pm_opp.h Georgi Djakov  2020-05-12  451  int dev_pm_opp_of_find_icc_paths(struct device *dev, struct opp_table *opp_table);
0e0ffa855d1590 include/linux/pm_opp.h Lukasz Luba    2020-05-27  452  int dev_pm_opp_of_register_em(struct device *dev, struct cpumask *cpus);
0e0ffa855d1590 include/linux/pm_opp.h Lukasz Luba    2020-05-27  453  static inline void dev_pm_opp_of_unregister_em(struct device *dev)
0e0ffa855d1590 include/linux/pm_opp.h Lukasz Luba    2020-05-27  454  {
0e0ffa855d1590 include/linux/pm_opp.h Lukasz Luba    2020-05-27  455  	em_dev_unregister_perf_domain(dev);
0e0ffa855d1590 include/linux/pm_opp.h Lukasz Luba    2020-05-27  456  }
d6561bb206aae9 include/linux/opp.h    Shawn Guo      2013-02-21  457  #else
8f8d37b2537a28 include/linux/pm_opp.h Viresh Kumar   2015-09-04 @458  static inline int dev_pm_opp_of_add_table(struct device *dev)
d6561bb206aae9 include/linux/opp.h    Shawn Guo      2013-02-21  459  {
1d614920318b91 include/linux/pm_opp.h Viresh Kumar   2021-02-01  460  	return -EOPNOTSUPP;
d6561bb206aae9 include/linux/opp.h    Shawn Guo      2013-02-21  461  }
129eec55df6ab1 include/linux/pm_opp.h Viresh Kumar   2014-11-27  462  
fa9b274f8aeffb include/linux/pm_opp.h Viresh Kumar   2017-04-26 @463  static inline int dev_pm_opp_of_add_table_indexed(struct device *dev, int index)
fa9b274f8aeffb include/linux/pm_opp.h Viresh Kumar   2017-04-26  464  {
1d614920318b91 include/linux/pm_opp.h Viresh Kumar   2021-02-01  465  	return -EOPNOTSUPP;
fa9b274f8aeffb include/linux/pm_opp.h Viresh Kumar   2017-04-26  466  }
fa9b274f8aeffb include/linux/pm_opp.h Viresh Kumar   2017-04-26  467  
559fef0dfd9114 include/linux/pm_opp.h Viresh Kumar   2021-01-27 @468  static inline int dev_pm_opp_of_add_table_noclk(struct device *dev, int index)
559fef0dfd9114 include/linux/pm_opp.h Viresh Kumar   2021-01-27  469  {
1d614920318b91 include/linux/pm_opp.h Viresh Kumar   2021-02-01  470  	return -EOPNOTSUPP;
559fef0dfd9114 include/linux/pm_opp.h Viresh Kumar   2021-01-27  471  }
559fef0dfd9114 include/linux/pm_opp.h Viresh Kumar   2021-01-27  472  
8f8d37b2537a28 include/linux/pm_opp.h Viresh Kumar   2015-09-04  473  static inline void dev_pm_opp_of_remove_table(struct device *dev)
129eec55df6ab1 include/linux/pm_opp.h Viresh Kumar   2014-11-27  474  {
129eec55df6ab1 include/linux/pm_opp.h Viresh Kumar   2014-11-27  475  }
8d4d4e98acd68c include/linux/pm_opp.h Viresh Kumar   2015-06-12  476  
3d5cfbb69508db include/linux/pm_opp.h Yangtao Li     2021-03-14 @477  static inline int devm_pm_opp_of_add_table(struct device *dev)
3d5cfbb69508db include/linux/pm_opp.h Yangtao Li     2021-03-14  478  {
3d5cfbb69508db include/linux/pm_opp.h Yangtao Li     2021-03-14  479  	return -EOPNOTSUPP;
3d5cfbb69508db include/linux/pm_opp.h Yangtao Li     2021-03-14  480  }
3d5cfbb69508db include/linux/pm_opp.h Yangtao Li     2021-03-14  481  
ddbb74bc70c0db include/linux/pm_opp.h Arnd Bergmann  2016-04-30 @482  static inline int dev_pm_opp_of_cpumask_add_table(const struct cpumask *cpumask)
8d4d4e98acd68c include/linux/pm_opp.h Viresh Kumar   2015-06-12  483  {
1d614920318b91 include/linux/pm_opp.h Viresh Kumar   2021-02-01  484  	return -EOPNOTSUPP;
8d4d4e98acd68c include/linux/pm_opp.h Viresh Kumar   2015-06-12  485  }
8d4d4e98acd68c include/linux/pm_opp.h Viresh Kumar   2015-06-12  486  
ddbb74bc70c0db include/linux/pm_opp.h Arnd Bergmann  2016-04-30  487  static inline void dev_pm_opp_of_cpumask_remove_table(const struct cpumask *cpumask)
8d4d4e98acd68c include/linux/pm_opp.h Viresh Kumar   2015-06-12  488  {
8d4d4e98acd68c include/linux/pm_opp.h Viresh Kumar   2015-06-12  489  }
8d4d4e98acd68c include/linux/pm_opp.h Viresh Kumar   2015-06-12  490  
ddbb74bc70c0db include/linux/pm_opp.h Arnd Bergmann  2016-04-30 @491  static inline int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask)
8d4d4e98acd68c include/linux/pm_opp.h Viresh Kumar   2015-06-12  492  {
1d614920318b91 include/linux/pm_opp.h Viresh Kumar   2021-02-01  493  	return -EOPNOTSUPP;
8d4d4e98acd68c include/linux/pm_opp.h Viresh Kumar   2015-06-12  494  }
0764c604c8128f include/linux/pm_opp.h Dave Gerlach   2017-02-03  495  
0764c604c8128f include/linux/pm_opp.h Dave Gerlach   2017-02-03 @496  static inline struct device_node *dev_pm_opp_of_get_opp_desc_node(struct device *dev)
0764c604c8128f include/linux/pm_opp.h Dave Gerlach   2017-02-03  497  {
0764c604c8128f include/linux/pm_opp.h Dave Gerlach   2017-02-03  498  	return NULL;
0764c604c8128f include/linux/pm_opp.h Dave Gerlach   2017-02-03  499  }
a88bd2a51e901e include/linux/pm_opp.h Viresh Kumar   2017-11-29  500  
e2f4b5f8dc59c2 include/linux/pm_opp.h Viresh Kumar   2018-01-12 @501  static inline struct device_node *dev_pm_opp_get_of_node(struct dev_pm_opp *opp)
e2f4b5f8dc59c2 include/linux/pm_opp.h Viresh Kumar   2018-01-12  502  {
e2f4b5f8dc59c2 include/linux/pm_opp.h Viresh Kumar   2018-01-12  503  	return NULL;
e2f4b5f8dc59c2 include/linux/pm_opp.h Viresh Kumar   2018-01-12  504  }
a4f342b9607d8c include/linux/pm_opp.h Quentin Perret 2019-02-04  505  
0e0ffa855d1590 include/linux/pm_opp.h Lukasz Luba    2020-05-27 @506  static inline int dev_pm_opp_of_register_em(struct device *dev,
0e0ffa855d1590 include/linux/pm_opp.h Lukasz Luba    2020-05-27 @507  					    struct cpumask *cpus)
0e0ffa855d1590 include/linux/pm_opp.h Lukasz Luba    2020-05-27  508  {
1d614920318b91 include/linux/pm_opp.h Viresh Kumar   2021-02-01  509  	return -EOPNOTSUPP;
0e0ffa855d1590 include/linux/pm_opp.h Lukasz Luba    2020-05-27  510  }
0e0ffa855d1590 include/linux/pm_opp.h Lukasz Luba    2020-05-27  511  
0e0ffa855d1590 include/linux/pm_opp.h Lukasz Luba    2020-05-27  512  static inline void dev_pm_opp_of_unregister_em(struct device *dev)
a4f342b9607d8c include/linux/pm_opp.h Quentin Perret 2019-02-04  513  {
a4f342b9607d8c include/linux/pm_opp.h Quentin Perret 2019-02-04  514  }
a4f342b9607d8c include/linux/pm_opp.h Quentin Perret 2019-02-04  515  
2feb5a896c42fb include/linux/pm_opp.h Viresh Kumar   2018-12-14 @516  static inline int of_get_required_opp_performance_state(struct device_node *np, int index)
4c6a343e57fe24 include/linux/pm_opp.h Viresh Kumar   2018-06-27  517  {
1d614920318b91 include/linux/pm_opp.h Viresh Kumar   2021-02-01  518  	return -EOPNOTSUPP;
4c6a343e57fe24 include/linux/pm_opp.h Viresh Kumar   2018-06-27  519  }
6d3f922c46f2e9 include/linux/pm_opp.h Georgi Djakov  2020-05-12  520  
6d3f922c46f2e9 include/linux/pm_opp.h Georgi Djakov  2020-05-12 @521  static inline int dev_pm_opp_of_find_icc_paths(struct device *dev, struct opp_table *opp_table)
6d3f922c46f2e9 include/linux/pm_opp.h Georgi Djakov  2020-05-12  522  {
1d614920318b91 include/linux/pm_opp.h Viresh Kumar   2021-02-01  523  	return -EOPNOTSUPP;
6d3f922c46f2e9 include/linux/pm_opp.h Georgi Djakov  2020-05-12  524  }
d6561bb206aae9 include/linux/opp.h    Shawn Guo      2013-02-21  525  #endif
d6561bb206aae9 include/linux/opp.h    Shawn Guo      2013-02-21  526  

:::::: The code at line 458 was first introduced by commit
:::::: 8f8d37b2537a28b5b2e3cb60dfc85a2a1303f99b PM / OPP: Prefix exported opp routines with dev_pm_opp_

:::::: TO: Viresh Kumar <viresh.kumar@linaro.org>
:::::: CC: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35762 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [linux-next:master 6632/9522] include/linux/pm_opp.h:458:58: warning: unused parameter 'dev'
@ 2021-08-20 19:30 ` kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2021-08-20 19:30 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 29689 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   86ed57fd8c93fdfaabb4f58e78455180fa7d8a84
commit: c17495b01b72b53bd290f442d39b060e015c7aea [6632/9522] cpufreq: Add callback to register with energy model
config: i386-randconfig-a016-20210820 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d9c5613e856cf2addfbf892fc4c1ce9ef9feceaa)
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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c17495b01b72b53bd290f442d39b060e015c7aea
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout c17495b01b72b53bd290f442d39b060e015c7aea
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   static inline void pm_vt_switch_unregister(struct device *dev)
                                                             ^
   In file included from drivers/gpu/drm/i915/gt/intel_llc.c:6:
   In file included from include/linux/cpufreq.h:12:
   In file included from include/linux/cpu.h:17:
   In file included from include/linux/node.h:18:
   include/linux/device.h:653:46: warning: unused parameter 'dev' [-Wunused-parameter]
   static inline int dev_to_node(struct device *dev)
                                                ^
   include/linux/device.h:657:48: warning: unused parameter 'dev' [-Wunused-parameter]
   static inline void set_dev_node(struct device *dev, int node)
                                                  ^
   include/linux/device.h:657:57: warning: unused parameter 'node' [-Wunused-parameter]
   static inline void set_dev_node(struct device *dev, int node)
                                                           ^
   In file included from drivers/gpu/drm/i915/gt/intel_llc.c:6:
   In file included from include/linux/cpufreq.h:12:
   In file included from include/linux/cpu.h:17:
   include/linux/node.h:72:48: warning: unused parameter 'nid' [-Wunused-parameter]
   static inline void node_add_cache(unsigned int nid,
                                                  ^
   include/linux/node.h:73:32: warning: unused parameter 'cache_attrs' [-Wunused-parameter]
                                     struct node_cache_attrs *cache_attrs)
                                                              ^
   include/linux/node.h:77:53: warning: unused parameter 'nid' [-Wunused-parameter]
   static inline void node_set_perf_attrs(unsigned int nid,
                                                       ^
   include/linux/node.h:78:36: warning: unused parameter 'hmem_attrs' [-Wunused-parameter]
                                          struct node_hmem_attrs *hmem_attrs,
                                                                  ^
   include/linux/node.h:79:21: warning: unused parameter 'access' [-Wunused-parameter]
                                          unsigned access)
                                                   ^
   include/linux/node.h:106:42: warning: unused parameter 'nid' [-Wunused-parameter]
   static inline void link_mem_sections(int nid, unsigned long start_pfn,
                                            ^
   include/linux/node.h:106:61: warning: unused parameter 'start_pfn' [-Wunused-parameter]
   static inline void link_mem_sections(int nid, unsigned long start_pfn,
                                                               ^
   include/linux/node.h:107:24: warning: unused parameter 'end_pfn' [-Wunused-parameter]
                                        unsigned long end_pfn,
                                                      ^
   include/linux/node.h:108:31: warning: unused parameter 'context' [-Wunused-parameter]
                                        enum meminit_context context)
                                                             ^
   include/linux/node.h:152:43: warning: unused parameter 'nid' [-Wunused-parameter]
   static inline int __register_one_node(int nid)
                                             ^
   include/linux/node.h:156:41: warning: unused parameter 'nid' [-Wunused-parameter]
   static inline int register_one_node(int nid)
                                           ^
   include/linux/node.h:160:43: warning: unused parameter 'nid' [-Wunused-parameter]
   static inline int unregister_one_node(int nid)
                                             ^
   include/linux/node.h:164:56: warning: unused parameter 'cpu' [-Wunused-parameter]
   static inline int register_cpu_under_node(unsigned int cpu, unsigned int nid)
                                                          ^
   include/linux/node.h:164:74: warning: unused parameter 'nid' [-Wunused-parameter]
   static inline int register_cpu_under_node(unsigned int cpu, unsigned int nid)
                                                                            ^
   include/linux/node.h:168:58: warning: unused parameter 'cpu' [-Wunused-parameter]
   static inline int unregister_cpu_under_node(unsigned int cpu, unsigned int nid)
                                                            ^
   include/linux/node.h:168:76: warning: unused parameter 'nid' [-Wunused-parameter]
   static inline int unregister_cpu_under_node(unsigned int cpu, unsigned int nid)
                                                                              ^
   include/linux/node.h:172:77: warning: unused parameter 'mem_blk' [-Wunused-parameter]
   static inline void unregister_memory_block_under_nodes(struct memory_block *mem_blk)
                                                                               ^
   include/linux/node.h:176:74: warning: unused parameter 'reg' [-Wunused-parameter]
   static inline void register_hugetlbfs_with_node(node_registration_func_t reg,
                                                                            ^
   include/linux/node.h:177:32: warning: unused parameter 'unreg' [-Wunused-parameter]
                                                   node_registration_func_t unreg)
                                                                            ^
   In file included from drivers/gpu/drm/i915/gt/intel_llc.c:6:
   In file included from include/linux/cpufreq.h:12:
   In file included from include/linux/cpu.h:20:
   include/linux/cpuhotplug.h:417:55: warning: unused parameter 'state' [-Wunused-parameter]
   static inline void cpuhp_online_idle(enum cpuhp_state state) { }
                                                         ^
   In file included from drivers/gpu/drm/i915/gt/intel_llc.c:6:
   In file included from include/linux/cpufreq.h:12:
   include/linux/cpu.h:111:40: warning: unused parameter 'cpu' [-Wunused-parameter]
   static inline int add_cpu(unsigned int cpu) { return 0;}
                                          ^
   include/linux/cpu.h:142:43: warning: unused parameter 'cpu' [-Wunused-parameter]
   static inline int remove_cpu(unsigned int cpu) { return -EPERM; }
                                             ^
   include/linux/cpu.h:143:59: warning: unused parameter 'primary_cpu' [-Wunused-parameter]
   static inline void smp_shutdown_nonboot_cpus(unsigned int primary_cpu) { }
                                                             ^
   include/linux/cpu.h:226:41: warning: unused parameter 'force' [-Wunused-parameter]
   static inline void cpu_smt_disable(bool force) { }
                                           ^
   include/linux/cpu.h:230:60: warning: unused parameter 'ctrlval' [-Wunused-parameter]
   static inline int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval) { return 0; }
                                                              ^
   In file included from drivers/gpu/drm/i915/gt/intel_llc.c:6:
   In file included from include/linux/cpufreq.h:17:
>> include/linux/pm_opp.h:458:58: warning: unused parameter 'dev' [-Wunused-parameter]
   static inline int dev_pm_opp_of_add_table(struct device *dev)
                                                            ^
   include/linux/pm_opp.h:463:66: warning: unused parameter 'dev' [-Wunused-parameter]
   static inline int dev_pm_opp_of_add_table_indexed(struct device *dev, int index)
                                                                    ^
>> include/linux/pm_opp.h:463:75: warning: unused parameter 'index' [-Wunused-parameter]
   static inline int dev_pm_opp_of_add_table_indexed(struct device *dev, int index)
                                                                             ^
   include/linux/pm_opp.h:468:64: warning: unused parameter 'dev' [-Wunused-parameter]
   static inline int dev_pm_opp_of_add_table_noclk(struct device *dev, int index)
                                                                  ^
   include/linux/pm_opp.h:468:73: warning: unused parameter 'index' [-Wunused-parameter]
   static inline int dev_pm_opp_of_add_table_noclk(struct device *dev, int index)
                                                                           ^
   include/linux/pm_opp.h:473:62: warning: unused parameter 'dev' [-Wunused-parameter]
   static inline void dev_pm_opp_of_remove_table(struct device *dev)
                                                                ^
   include/linux/pm_opp.h:477:59: warning: unused parameter 'dev' [-Wunused-parameter]
   static inline int devm_pm_opp_of_add_table(struct device *dev)
                                                             ^
>> include/linux/pm_opp.h:482:73: warning: unused parameter 'cpumask' [-Wunused-parameter]
   static inline int dev_pm_opp_of_cpumask_add_table(const struct cpumask *cpumask)
                                                                           ^
   include/linux/pm_opp.h:487:77: warning: unused parameter 'cpumask' [-Wunused-parameter]
   static inline void dev_pm_opp_of_cpumask_remove_table(const struct cpumask *cpumask)
                                                                               ^
>> include/linux/pm_opp.h:491:65: warning: unused parameter 'cpu_dev' [-Wunused-parameter]
   static inline int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask)
                                                                   ^
   include/linux/pm_opp.h:491:90: warning: unused parameter 'cpumask' [-Wunused-parameter]
   static inline int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask)
                                                                                            ^
   include/linux/pm_opp.h:496:82: warning: unused parameter 'dev' [-Wunused-parameter]
   static inline struct device_node *dev_pm_opp_of_get_opp_desc_node(struct device *dev)
                                                                                    ^
>> include/linux/pm_opp.h:501:77: warning: unused parameter 'opp' [-Wunused-parameter]
   static inline struct device_node *dev_pm_opp_get_of_node(struct dev_pm_opp *opp)
                                                                               ^
   include/linux/pm_opp.h:506:60: warning: unused parameter 'dev' [-Wunused-parameter]
   static inline int dev_pm_opp_of_register_em(struct device *dev,
                                                              ^
>> include/linux/pm_opp.h:507:26: warning: unused parameter 'cpus' [-Wunused-parameter]
                                               struct cpumask *cpus)
                                                               ^
   include/linux/pm_opp.h:512:63: warning: unused parameter 'dev' [-Wunused-parameter]
   static inline void dev_pm_opp_of_unregister_em(struct device *dev)
                                                                 ^
>> include/linux/pm_opp.h:516:77: warning: unused parameter 'np' [-Wunused-parameter]
   static inline int of_get_required_opp_performance_state(struct device_node *np, int index)
                                                                               ^
   include/linux/pm_opp.h:516:85: warning: unused parameter 'index' [-Wunused-parameter]
   static inline int of_get_required_opp_performance_state(struct device_node *np, int index)
                                                                                       ^
   include/linux/pm_opp.h:521:63: warning: unused parameter 'dev' [-Wunused-parameter]
   static inline int dev_pm_opp_of_find_icc_paths(struct device *dev, struct opp_table *opp_table)
                                                                 ^
>> include/linux/pm_opp.h:521:86: warning: unused parameter 'opp_table' [-Wunused-parameter]
   static inline int dev_pm_opp_of_find_icc_paths(struct device *dev, struct opp_table *opp_table)
                                                                                        ^
   In file included from drivers/gpu/drm/i915/gt/intel_llc.c:6:
   include/linux/cpufreq.h:261:70: warning: unused parameter 'policy' [-Wunused-parameter]
   static inline void cpufreq_stats_create_table(struct cpufreq_policy *policy) { }
                                                                        ^
   include/linux/cpufreq.h:262:68: warning: unused parameter 'policy' [-Wunused-parameter]
   static inline void cpufreq_stats_free_table(struct cpufreq_policy *policy) { }
                                                                      ^
   include/linux/cpufreq.h:263:75: warning: unused parameter 'policy' [-Wunused-parameter]
   static inline void cpufreq_stats_record_transition(struct cpufreq_policy *policy,
                                                                             ^
   include/linux/cpufreq.h:264:23: warning: unused parameter 'new_freq' [-Wunused-parameter]
                                                      unsigned int new_freq) { }
                                                                   ^
   include/linux/cpufreq.h:1031:73: warning: unused parameter 'policy' [-Wunused-parameter]
   static inline void sched_cpufreq_governor_change(struct cpufreq_policy *policy,
                                                                           ^
   include/linux/cpufreq.h:1032:29: warning: unused parameter 'old_gov' [-Wunused-parameter]
                           struct cpufreq_governor *old_gov) { }
                                                    ^
   include/linux/cpufreq.h:1040:48: warning: unused parameter 'cpus' [-Wunused-parameter]
   void arch_set_freq_scale(const struct cpumask *cpus,
                                                  ^
   include/linux/cpufreq.h:1041:19: warning: unused parameter 'cur_freq' [-Wunused-parameter]
                            unsigned long cur_freq,
                                          ^
   include/linux/cpufreq.h:1042:19: warning: unused parameter 'max_freq' [-Wunused-parameter]
                            unsigned long max_freq)
                                          ^
   In file included from drivers/gpu/drm/i915/gt/intel_llc.c:8:
   In file included from drivers/gpu/drm/i915/i915_drv.h:36:
   In file included from arch/x86/include/asm/hypervisor.h:37:
   In file included from arch/x86/include/asm/kvm_para.h:7:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:5:
   include/linux/context_tracking_state.h:51:53: warning: unused parameter 'cpu' [-Wunused-parameter]
   static inline bool context_tracking_enabled_cpu(int cpu) { return false; }
                                                       ^
   In file included from drivers/gpu/drm/i915/gt/intel_llc.c:8:
   In file included from drivers/gpu/drm/i915/i915_drv.h:36:
   In file included from arch/x86/include/asm/hypervisor.h:37:
   In file included from arch/x86/include/asm/kvm_para.h:7:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:10:
   include/linux/vtime.h:28:57: warning: unused parameter 'tsk' [-Wunused-parameter]
   static inline void vtime_user_enter(struct task_struct *tsk) { }
                                                           ^
   include/linux/vtime.h:29:56: warning: unused parameter 'tsk' [-Wunused-parameter]
   static inline void vtime_user_exit(struct task_struct *tsk) { }
                                                          ^
   include/linux/vtime.h:30:58: warning: unused parameter 'tsk' [-Wunused-parameter]
   static inline void vtime_guest_enter(struct task_struct *tsk) { }
                                                            ^
   include/linux/vtime.h:31:57: warning: unused parameter 'tsk' [-Wunused-parameter]
   static inline void vtime_guest_exit(struct task_struct *tsk) { }
                                                           ^
   include/linux/vtime.h:32:56: warning: unused parameter 'tsk' [-Wunused-parameter]
   static inline void vtime_init_idle(struct task_struct *tsk, int cpu) { }
                                                          ^
   include/linux/vtime.h:32:65: warning: unused parameter 'cpu' [-Wunused-parameter]
   static inline void vtime_init_idle(struct task_struct *tsk, int cpu) { }
                                                                   ^
   include/linux/vtime.h:41:58: warning: unused parameter 'tsk' [-Wunused-parameter]
   static inline void vtime_account_irq(struct task_struct *tsk, unsigned int offset) { }
                                                            ^
   include/linux/vtime.h:41:76: warning: unused parameter 'offset' [-Wunused-parameter]
   static inline void vtime_account_irq(struct task_struct *tsk, unsigned int offset) { }
                                                                              ^
   include/linux/vtime.h:42:62: warning: unused parameter 'tsk' [-Wunused-parameter]
   static inline void vtime_account_softirq(struct task_struct *tsk) { }
                                                                ^
   include/linux/vtime.h:43:62: warning: unused parameter 'tsk' [-Wunused-parameter]
   static inline void vtime_account_hardirq(struct task_struct *tsk) { }
                                                                ^
   include/linux/vtime.h:44:52: warning: unused parameter 'tsk' [-Wunused-parameter]
   static inline void vtime_flush(struct task_struct *tsk) { }
                                                      ^
   include/linux/vtime.h:117:58: warning: unused parameter 'prev' [-Wunused-parameter]
   static inline void vtime_task_switch(struct task_struct *prev) { }
                                                            ^
   include/linux/vtime.h:135:60: warning: unused parameter 'tsk' [-Wunused-parameter]
   static inline void irqtime_account_irq(struct task_struct *tsk, unsigned int offset) { }
                                                              ^
   include/linux/vtime.h:135:78: warning: unused parameter 'offset' [-Wunused-parameter]
   static inline void irqtime_account_irq(struct task_struct *tsk, unsigned int offset) { }
                                                                                ^
   In file included from drivers/gpu/drm/i915/gt/intel_llc.c:8:
   In file included from drivers/gpu/drm/i915/i915_drv.h:36:
   In file included from arch/x86/include/asm/hypervisor.h:37:
   In file included from arch/x86/include/asm/kvm_para.h:7:
   In file included from include/linux/interrupt.h:20:
   In file included from arch/x86/include/asm/sections.h:7:
   include/asm-generic/sections.h:70:53: warning: unused parameter 'addr' [-Wunused-parameter]
   static inline int arch_is_kernel_text(unsigned long addr)
                                                       ^
   include/asm-generic/sections.h:77:53: warning: unused parameter 'addr' [-Wunused-parameter]
   static inline int arch_is_kernel_data(unsigned long addr)
                                                       ^
   In file included from drivers/gpu/drm/i915/gt/intel_llc.c:8:


vim +/dev +458 include/linux/pm_opp.h

e1f60b292ffd61 include/linux/opp.h    Nishanth Menon 2010-10-13  438  
d6561bb206aae9 include/linux/opp.h    Shawn Guo      2013-02-21  439  #if defined(CONFIG_PM_OPP) && defined(CONFIG_OF)
8f8d37b2537a28 include/linux/pm_opp.h Viresh Kumar   2015-09-04  440  int dev_pm_opp_of_add_table(struct device *dev);
fa9b274f8aeffb include/linux/pm_opp.h Viresh Kumar   2017-04-26  441  int dev_pm_opp_of_add_table_indexed(struct device *dev, int index);
559fef0dfd9114 include/linux/pm_opp.h Viresh Kumar   2021-01-27  442  int dev_pm_opp_of_add_table_noclk(struct device *dev, int index);
8f8d37b2537a28 include/linux/pm_opp.h Viresh Kumar   2015-09-04  443  void dev_pm_opp_of_remove_table(struct device *dev);
3d5cfbb69508db include/linux/pm_opp.h Yangtao Li     2021-03-14  444  int devm_pm_opp_of_add_table(struct device *dev);
ddbb74bc70c0db include/linux/pm_opp.h Arnd Bergmann  2016-04-30  445  int dev_pm_opp_of_cpumask_add_table(const struct cpumask *cpumask);
ddbb74bc70c0db include/linux/pm_opp.h Arnd Bergmann  2016-04-30  446  void dev_pm_opp_of_cpumask_remove_table(const struct cpumask *cpumask);
ddbb74bc70c0db include/linux/pm_opp.h Arnd Bergmann  2016-04-30  447  int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask);
0764c604c8128f include/linux/pm_opp.h Dave Gerlach   2017-02-03  448  struct device_node *dev_pm_opp_of_get_opp_desc_node(struct device *dev);
e2f4b5f8dc59c2 include/linux/pm_opp.h Viresh Kumar   2018-01-12  449  struct device_node *dev_pm_opp_get_of_node(struct dev_pm_opp *opp);
2feb5a896c42fb include/linux/pm_opp.h Viresh Kumar   2018-12-14  450  int of_get_required_opp_performance_state(struct device_node *np, int index);
6d3f922c46f2e9 include/linux/pm_opp.h Georgi Djakov  2020-05-12  451  int dev_pm_opp_of_find_icc_paths(struct device *dev, struct opp_table *opp_table);
0e0ffa855d1590 include/linux/pm_opp.h Lukasz Luba    2020-05-27  452  int dev_pm_opp_of_register_em(struct device *dev, struct cpumask *cpus);
0e0ffa855d1590 include/linux/pm_opp.h Lukasz Luba    2020-05-27  453  static inline void dev_pm_opp_of_unregister_em(struct device *dev)
0e0ffa855d1590 include/linux/pm_opp.h Lukasz Luba    2020-05-27  454  {
0e0ffa855d1590 include/linux/pm_opp.h Lukasz Luba    2020-05-27  455  	em_dev_unregister_perf_domain(dev);
0e0ffa855d1590 include/linux/pm_opp.h Lukasz Luba    2020-05-27  456  }
d6561bb206aae9 include/linux/opp.h    Shawn Guo      2013-02-21  457  #else
8f8d37b2537a28 include/linux/pm_opp.h Viresh Kumar   2015-09-04 @458  static inline int dev_pm_opp_of_add_table(struct device *dev)
d6561bb206aae9 include/linux/opp.h    Shawn Guo      2013-02-21  459  {
1d614920318b91 include/linux/pm_opp.h Viresh Kumar   2021-02-01  460  	return -EOPNOTSUPP;
d6561bb206aae9 include/linux/opp.h    Shawn Guo      2013-02-21  461  }
129eec55df6ab1 include/linux/pm_opp.h Viresh Kumar   2014-11-27  462  
fa9b274f8aeffb include/linux/pm_opp.h Viresh Kumar   2017-04-26 @463  static inline int dev_pm_opp_of_add_table_indexed(struct device *dev, int index)
fa9b274f8aeffb include/linux/pm_opp.h Viresh Kumar   2017-04-26  464  {
1d614920318b91 include/linux/pm_opp.h Viresh Kumar   2021-02-01  465  	return -EOPNOTSUPP;
fa9b274f8aeffb include/linux/pm_opp.h Viresh Kumar   2017-04-26  466  }
fa9b274f8aeffb include/linux/pm_opp.h Viresh Kumar   2017-04-26  467  
559fef0dfd9114 include/linux/pm_opp.h Viresh Kumar   2021-01-27 @468  static inline int dev_pm_opp_of_add_table_noclk(struct device *dev, int index)
559fef0dfd9114 include/linux/pm_opp.h Viresh Kumar   2021-01-27  469  {
1d614920318b91 include/linux/pm_opp.h Viresh Kumar   2021-02-01  470  	return -EOPNOTSUPP;
559fef0dfd9114 include/linux/pm_opp.h Viresh Kumar   2021-01-27  471  }
559fef0dfd9114 include/linux/pm_opp.h Viresh Kumar   2021-01-27  472  
8f8d37b2537a28 include/linux/pm_opp.h Viresh Kumar   2015-09-04  473  static inline void dev_pm_opp_of_remove_table(struct device *dev)
129eec55df6ab1 include/linux/pm_opp.h Viresh Kumar   2014-11-27  474  {
129eec55df6ab1 include/linux/pm_opp.h Viresh Kumar   2014-11-27  475  }
8d4d4e98acd68c include/linux/pm_opp.h Viresh Kumar   2015-06-12  476  
3d5cfbb69508db include/linux/pm_opp.h Yangtao Li     2021-03-14 @477  static inline int devm_pm_opp_of_add_table(struct device *dev)
3d5cfbb69508db include/linux/pm_opp.h Yangtao Li     2021-03-14  478  {
3d5cfbb69508db include/linux/pm_opp.h Yangtao Li     2021-03-14  479  	return -EOPNOTSUPP;
3d5cfbb69508db include/linux/pm_opp.h Yangtao Li     2021-03-14  480  }
3d5cfbb69508db include/linux/pm_opp.h Yangtao Li     2021-03-14  481  
ddbb74bc70c0db include/linux/pm_opp.h Arnd Bergmann  2016-04-30 @482  static inline int dev_pm_opp_of_cpumask_add_table(const struct cpumask *cpumask)
8d4d4e98acd68c include/linux/pm_opp.h Viresh Kumar   2015-06-12  483  {
1d614920318b91 include/linux/pm_opp.h Viresh Kumar   2021-02-01  484  	return -EOPNOTSUPP;
8d4d4e98acd68c include/linux/pm_opp.h Viresh Kumar   2015-06-12  485  }
8d4d4e98acd68c include/linux/pm_opp.h Viresh Kumar   2015-06-12  486  
ddbb74bc70c0db include/linux/pm_opp.h Arnd Bergmann  2016-04-30  487  static inline void dev_pm_opp_of_cpumask_remove_table(const struct cpumask *cpumask)
8d4d4e98acd68c include/linux/pm_opp.h Viresh Kumar   2015-06-12  488  {
8d4d4e98acd68c include/linux/pm_opp.h Viresh Kumar   2015-06-12  489  }
8d4d4e98acd68c include/linux/pm_opp.h Viresh Kumar   2015-06-12  490  
ddbb74bc70c0db include/linux/pm_opp.h Arnd Bergmann  2016-04-30 @491  static inline int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask)
8d4d4e98acd68c include/linux/pm_opp.h Viresh Kumar   2015-06-12  492  {
1d614920318b91 include/linux/pm_opp.h Viresh Kumar   2021-02-01  493  	return -EOPNOTSUPP;
8d4d4e98acd68c include/linux/pm_opp.h Viresh Kumar   2015-06-12  494  }
0764c604c8128f include/linux/pm_opp.h Dave Gerlach   2017-02-03  495  
0764c604c8128f include/linux/pm_opp.h Dave Gerlach   2017-02-03 @496  static inline struct device_node *dev_pm_opp_of_get_opp_desc_node(struct device *dev)
0764c604c8128f include/linux/pm_opp.h Dave Gerlach   2017-02-03  497  {
0764c604c8128f include/linux/pm_opp.h Dave Gerlach   2017-02-03  498  	return NULL;
0764c604c8128f include/linux/pm_opp.h Dave Gerlach   2017-02-03  499  }
a88bd2a51e901e include/linux/pm_opp.h Viresh Kumar   2017-11-29  500  
e2f4b5f8dc59c2 include/linux/pm_opp.h Viresh Kumar   2018-01-12 @501  static inline struct device_node *dev_pm_opp_get_of_node(struct dev_pm_opp *opp)
e2f4b5f8dc59c2 include/linux/pm_opp.h Viresh Kumar   2018-01-12  502  {
e2f4b5f8dc59c2 include/linux/pm_opp.h Viresh Kumar   2018-01-12  503  	return NULL;
e2f4b5f8dc59c2 include/linux/pm_opp.h Viresh Kumar   2018-01-12  504  }
a4f342b9607d8c include/linux/pm_opp.h Quentin Perret 2019-02-04  505  
0e0ffa855d1590 include/linux/pm_opp.h Lukasz Luba    2020-05-27 @506  static inline int dev_pm_opp_of_register_em(struct device *dev,
0e0ffa855d1590 include/linux/pm_opp.h Lukasz Luba    2020-05-27 @507  					    struct cpumask *cpus)
0e0ffa855d1590 include/linux/pm_opp.h Lukasz Luba    2020-05-27  508  {
1d614920318b91 include/linux/pm_opp.h Viresh Kumar   2021-02-01  509  	return -EOPNOTSUPP;
0e0ffa855d1590 include/linux/pm_opp.h Lukasz Luba    2020-05-27  510  }
0e0ffa855d1590 include/linux/pm_opp.h Lukasz Luba    2020-05-27  511  
0e0ffa855d1590 include/linux/pm_opp.h Lukasz Luba    2020-05-27  512  static inline void dev_pm_opp_of_unregister_em(struct device *dev)
a4f342b9607d8c include/linux/pm_opp.h Quentin Perret 2019-02-04  513  {
a4f342b9607d8c include/linux/pm_opp.h Quentin Perret 2019-02-04  514  }
a4f342b9607d8c include/linux/pm_opp.h Quentin Perret 2019-02-04  515  
2feb5a896c42fb include/linux/pm_opp.h Viresh Kumar   2018-12-14 @516  static inline int of_get_required_opp_performance_state(struct device_node *np, int index)
4c6a343e57fe24 include/linux/pm_opp.h Viresh Kumar   2018-06-27  517  {
1d614920318b91 include/linux/pm_opp.h Viresh Kumar   2021-02-01  518  	return -EOPNOTSUPP;
4c6a343e57fe24 include/linux/pm_opp.h Viresh Kumar   2018-06-27  519  }
6d3f922c46f2e9 include/linux/pm_opp.h Georgi Djakov  2020-05-12  520  
6d3f922c46f2e9 include/linux/pm_opp.h Georgi Djakov  2020-05-12 @521  static inline int dev_pm_opp_of_find_icc_paths(struct device *dev, struct opp_table *opp_table)
6d3f922c46f2e9 include/linux/pm_opp.h Georgi Djakov  2020-05-12  522  {
1d614920318b91 include/linux/pm_opp.h Viresh Kumar   2021-02-01  523  	return -EOPNOTSUPP;
6d3f922c46f2e9 include/linux/pm_opp.h Georgi Djakov  2020-05-12  524  }
d6561bb206aae9 include/linux/opp.h    Shawn Guo      2013-02-21  525  #endif
d6561bb206aae9 include/linux/opp.h    Shawn Guo      2013-02-21  526  

:::::: The code at line 458 was first introduced by commit
:::::: 8f8d37b2537a28b5b2e3cb60dfc85a2a1303f99b PM / OPP: Prefix exported opp routines with dev_pm_opp_

:::::: TO: Viresh Kumar <viresh.kumar@linaro.org>
:::::: CC: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35762 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-next:master 6632/9522] include/linux/pm_opp.h:458:58: warning: unused parameter 'dev'
  2021-08-20 19:30 ` kernel test robot
@ 2021-08-23  3:15   ` Viresh Kumar
  -1 siblings, 0 replies; 8+ messages in thread
From: Viresh Kumar @ 2021-08-23  3:15 UTC (permalink / raw)
  To: kernel test robot
  Cc: clang-built-linux, kbuild-all, Linux Memory Management List,
	Quentin Perret, Lukasz Luba

On 21-08-21, 03:30, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   86ed57fd8c93fdfaabb4f58e78455180fa7d8a84
> commit: c17495b01b72b53bd290f442d39b060e015c7aea [6632/9522] cpufreq: Add callback to register with energy model
> config: i386-randconfig-a016-20210820 (attached as .config)
> compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d9c5613e856cf2addfbf892fc4c1ce9ef9feceaa)
> 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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c17495b01b72b53bd290f442d39b060e015c7aea
>         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>         git fetch --no-tags linux-next master
>         git checkout c17495b01b72b53bd290f442d39b060e015c7aea
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
>    static inline void pm_vt_switch_unregister(struct device *dev)
>                                                              ^
>    In file included from drivers/gpu/drm/i915/gt/intel_llc.c:6:
>    In file included from include/linux/cpufreq.h:12:
>    In file included from include/linux/cpu.h:17:
>    In file included from include/linux/node.h:18:
>    include/linux/device.h:653:46: warning: unused parameter 'dev' [-Wunused-parameter]
>    static inline int dev_to_node(struct device *dev)

False positives ? These are mostly inline dummies, which simply return
errors. Their parameters aren't supposed to be used.

-- 
viresh


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-next:master 6632/9522] include/linux/pm_opp.h:458:58: warning: unused parameter 'dev'
@ 2021-08-23  3:15   ` Viresh Kumar
  0 siblings, 0 replies; 8+ messages in thread
From: Viresh Kumar @ 2021-08-23  3:15 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1971 bytes --]

On 21-08-21, 03:30, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   86ed57fd8c93fdfaabb4f58e78455180fa7d8a84
> commit: c17495b01b72b53bd290f442d39b060e015c7aea [6632/9522] cpufreq: Add callback to register with energy model
> config: i386-randconfig-a016-20210820 (attached as .config)
> compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d9c5613e856cf2addfbf892fc4c1ce9ef9feceaa)
> 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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c17495b01b72b53bd290f442d39b060e015c7aea
>         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>         git fetch --no-tags linux-next master
>         git checkout c17495b01b72b53bd290f442d39b060e015c7aea
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
>    static inline void pm_vt_switch_unregister(struct device *dev)
>                                                              ^
>    In file included from drivers/gpu/drm/i915/gt/intel_llc.c:6:
>    In file included from include/linux/cpufreq.h:12:
>    In file included from include/linux/cpu.h:17:
>    In file included from include/linux/node.h:18:
>    include/linux/device.h:653:46: warning: unused parameter 'dev' [-Wunused-parameter]
>    static inline int dev_to_node(struct device *dev)

False positives ? These are mostly inline dummies, which simply return
errors. Their parameters aren't supposed to be used.

-- 
viresh

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-next:master 6632/9522] include/linux/pm_opp.h:458:58: warning: unused parameter 'dev'
  2021-08-23  3:15   ` Viresh Kumar
@ 2021-08-23  9:07     ` Arnd Bergmann
  -1 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2021-08-23  9:07 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: kernel test robot, clang-built-linux, kbuild-all,
	Linux Memory Management List, Quentin Perret, Lukasz Luba

On Mon, Aug 23, 2021 at 5:15 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> On 21-08-21, 03:30, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head:   86ed57fd8c93fdfaabb4f58e78455180fa7d8a84
> > commit: c17495b01b72b53bd290f442d39b060e015c7aea [6632/9522] cpufreq: Add callback to register with energy model
> > config: i386-randconfig-a016-20210820 (attached as .config)
> > compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d9c5613e856cf2addfbf892fc4c1ce9ef9feceaa)
> > 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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c17495b01b72b53bd290f442d39b060e015c7aea
> >         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> >         git fetch --no-tags linux-next master
> >         git checkout c17495b01b72b53bd290f442d39b060e015c7aea
> >         # save the attached .config to linux build tree
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All warnings (new ones prefixed by >>):
> >
> >    static inline void pm_vt_switch_unregister(struct device *dev)
> >                                                              ^
> >    In file included from drivers/gpu/drm/i915/gt/intel_llc.c:6:
> >    In file included from include/linux/cpufreq.h:12:
> >    In file included from include/linux/cpu.h:17:
> >    In file included from include/linux/node.h:18:
> >    include/linux/device.h:653:46: warning: unused parameter 'dev' [-Wunused-parameter]
> >    static inline int dev_to_node(struct device *dev)
>
> False positives ? These are mostly inline dummies, which simply return
> errors. Their parameters aren't supposed to be used.

It's a clang-14 W=1 build, probably something went wrong with the clang specific
warning flags there. I think we do want "-Wunused -Wno-unused-parameter". Not
sure what changed compared to older clang builds.

        Arnd


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-next:master 6632/9522] include/linux/pm_opp.h:458:58: warning: unused parameter 'dev'
@ 2021-08-23  9:07     ` Arnd Bergmann
  0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2021-08-23  9:07 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2327 bytes --]

On Mon, Aug 23, 2021 at 5:15 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> On 21-08-21, 03:30, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head:   86ed57fd8c93fdfaabb4f58e78455180fa7d8a84
> > commit: c17495b01b72b53bd290f442d39b060e015c7aea [6632/9522] cpufreq: Add callback to register with energy model
> > config: i386-randconfig-a016-20210820 (attached as .config)
> > compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d9c5613e856cf2addfbf892fc4c1ce9ef9feceaa)
> > 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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c17495b01b72b53bd290f442d39b060e015c7aea
> >         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> >         git fetch --no-tags linux-next master
> >         git checkout c17495b01b72b53bd290f442d39b060e015c7aea
> >         # save the attached .config to linux build tree
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All warnings (new ones prefixed by >>):
> >
> >    static inline void pm_vt_switch_unregister(struct device *dev)
> >                                                              ^
> >    In file included from drivers/gpu/drm/i915/gt/intel_llc.c:6:
> >    In file included from include/linux/cpufreq.h:12:
> >    In file included from include/linux/cpu.h:17:
> >    In file included from include/linux/node.h:18:
> >    include/linux/device.h:653:46: warning: unused parameter 'dev' [-Wunused-parameter]
> >    static inline int dev_to_node(struct device *dev)
>
> False positives ? These are mostly inline dummies, which simply return
> errors. Their parameters aren't supposed to be used.

It's a clang-14 W=1 build, probably something went wrong with the clang specific
warning flags there. I think we do want "-Wunused -Wno-unused-parameter". Not
sure what changed compared to older clang builds.

        Arnd

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-next:master 6632/9522] include/linux/pm_opp.h:458:58: warning: unused parameter 'dev'
  2021-08-23  9:07     ` Arnd Bergmann
@ 2021-08-23 20:28       ` Nathan Chancellor
  -1 siblings, 0 replies; 8+ messages in thread
From: Nathan Chancellor @ 2021-08-23 20:28 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Viresh Kumar, kernel test robot, clang-built-linux, kbuild-all,
	Linux Memory Management List, Quentin Perret, Lukasz Luba

On Mon, Aug 23, 2021 at 11:07:13AM +0200, Arnd Bergmann wrote:
> On Mon, Aug 23, 2021 at 5:15 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> >
> > On 21-08-21, 03:30, kernel test robot wrote:
> > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > > head:   86ed57fd8c93fdfaabb4f58e78455180fa7d8a84
> > > commit: c17495b01b72b53bd290f442d39b060e015c7aea [6632/9522] cpufreq: Add callback to register with energy model
> > > config: i386-randconfig-a016-20210820 (attached as .config)
> > > compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d9c5613e856cf2addfbf892fc4c1ce9ef9feceaa)
> > > 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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c17495b01b72b53bd290f442d39b060e015c7aea
> > >         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> > >         git fetch --no-tags linux-next master
> > >         git checkout c17495b01b72b53bd290f442d39b060e015c7aea
> > >         # save the attached .config to linux build tree
> > >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
> > >
> > > If you fix the issue, kindly add following tag as appropriate
> > > Reported-by: kernel test robot <lkp@intel.com>
> > >
> > > All warnings (new ones prefixed by >>):
> > >
> > >    static inline void pm_vt_switch_unregister(struct device *dev)
> > >                                                              ^
> > >    In file included from drivers/gpu/drm/i915/gt/intel_llc.c:6:
> > >    In file included from include/linux/cpufreq.h:12:
> > >    In file included from include/linux/cpu.h:17:
> > >    In file included from include/linux/node.h:18:
> > >    include/linux/device.h:653:46: warning: unused parameter 'dev' [-Wunused-parameter]
> > >    static inline int dev_to_node(struct device *dev)
> >
> > False positives ? These are mostly inline dummies, which simply return
> > errors. Their parameters aren't supposed to be used.
> 
> It's a clang-14 W=1 build, probably something went wrong with the clang specific
> warning flags there. I think we do want "-Wunused -Wno-unused-parameter". Not
> sure what changed compared to older clang builds.

W=1 already does this:

$ sed -n '23,25p' scripts/Makefile.extrawarn
ifneq ($(findstring 1, $(KBUILD_EXTRA_WARN)),)

KBUILD_CFLAGS += -Wextra -Wunused -Wno-unused-parameter

The problem is the same one as commit fa63da2ab046 ("arm64: Don't
unconditionally add -Wno-psabi to KBUILD_CFLAGS") but just with an '-f'
flag instead of a '-W' flag.

This config has CONFIG_MEFFICEON=y, which adds a few '-falign-...' flags
to cflags-y, namely '-falign-jumps=0', which is not supported by clang:

clang-14: warning: optimization flag '-falign-jumps=0' is not supported [-Wignored-optimization-argument]

As a result, all subsequent cc-{disable-warning,option} calls fail because the
command always fails with an unknown flag in the mix since we added -Werror to
cc-{disable-warning,option} to work around this exact situation where clang
only emits a warning rather than an error for unknown flags.  I improved this
in commit 589834b3a009 ("kbuild: Add -Werror=unknown-warning-option to
CLANG_FLAGS") so that we get alerted of failed flags before this but I guess I
missed this one :).

i915 enables '-Wall -Wextra' then disables a few warnings (including
'-Wunused-parameter') with cc-disable-warning, which does not work, so we get
all of these warnings as a result.

I think fixing this once and for all is a three pronged approach:

1. '-falign-jumps=' should not be added unconditionally, as it is not
   supported in clang (as it warns rather than errors about...).
   '-falign-loops=' falls into the same category, as it is only
   supported on clang-14 and newer.

   Something like this should do it (no point in making GCC pay the
   cc-option cost):

diff --git a/arch/x86/Makefile_32.cpu b/arch/x86/Makefile_32.cpu
index cd3056759880..1db40f14719d 100644
--- a/arch/x86/Makefile_32.cpu
+++ b/arch/x86/Makefile_32.cpu
@@ -25,11 +25,16 @@ cflags-$(CONFIG_MK6)                += -march=k6
 # They make zero difference whatsosever to performance at this time.
 cflags-$(CONFIG_MK7)           += -march=athlon
 cflags-$(CONFIG_MK8)           += $(call cc-option,-march=k8,-march=athlon)
-cflags-$(CONFIG_MCRUSOE)       += -march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0
-cflags-$(CONFIG_MEFFICEON)     += -march=i686 $(call tune,pentium3) -falign-functions=0 -falign-jumps=0 -falign-loops=0
+ifdef CONFIG_CC_IS_CLANG
+align := -falign-functions=0 $(call cc-option,-falign-jumps=0) $(call cc-option,-falign-loops=0)
+else
+align := -falign-functions=0 -falign-jumps=0 -falign-loops=0
+endif
+cflags-$(CONFIG_MCRUSOE)       += -march=i686 $(align)
+cflags-$(CONFIG_MEFFICEON)     += -march=i686 $(call tune,pentium3) $(align)
 cflags-$(CONFIG_MWINCHIPC6)    += $(call cc-option,-march=winchip-c6,-march=i586)
 cflags-$(CONFIG_MWINCHIP3D)    += $(call cc-option,-march=winchip2,-march=i586)
-cflags-$(CONFIG_MCYRIXIII)     += $(call cc-option,-march=c3,-march=i486) -falign-functions=0 -falign-jumps=0 -falign-loops=0
+cflags-$(CONFIG_MCYRIXIII)     += $(call cc-option,-march=c3,-march=i486) $(align)
 cflags-$(CONFIG_MVIAC3_2)      += $(call cc-option,-march=c3-2,-march=i686)
 cflags-$(CONFIG_MVIAC7)                += -march=i686
 cflags-$(CONFIG_MCORE2)                += -march=i686 $(call tune,core2)

2. i915 should not be using cc-disable-warning for most of the flags
   that they are, as they are supported by both compilers and the rest
   of the kernel assumes this. I plan to send a series to turn on
   -Wsometimes-uninitialized for i195 shortly so I will send this diff
   as a prior change in that series.

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 642a5b5a1b81..9f05b3b18816 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -13,15 +13,16 @@
 # will most likely get a sudden build breakage... Hopefully we will fix
 # new warnings before CI updates!
 subdir-ccflags-y := -Wall -Wextra
-subdir-ccflags-y += $(call cc-disable-warning, unused-parameter)
-subdir-ccflags-y += $(call cc-disable-warning, type-limits)
-subdir-ccflags-y += $(call cc-disable-warning, missing-field-initializers)
+subdir-ccflags-y += -Wno-unused-parameter
+subdir-ccflags-y += -Wno-type-limits
+subdir-ccflags-y += -Wno-missing-field-initializers
 subdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
-# clang warnings
-subdir-ccflags-y += $(call cc-disable-warning, sign-compare)
-subdir-ccflags-y += $(call cc-disable-warning, sometimes-uninitialized)
-subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides)
 subdir-ccflags-y += $(call cc-disable-warning, frame-address)
+ifdef CONFIG_CC_IS_CLANG
+subdir-ccflags-y += -Wno-sign-compare
+subdir-ccflags-y += -Wno-sometimes-uninitialized
+subdir-ccflags-y += -Wno-initializer-overrides
+endif
 subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror

 # Fine grained warnings disable

3. We should not allow unknown flags to get added to the command line
   without our knowledge. Bugs like this are annoying for several
   parties so we should minimize them as much as possible. I will
   propose this in the same series as the first diff, which should avoid
   the initial issue altogether (the second step is more of an
   optimization for the future).

diff --git a/scripts/Makefile.clang b/scripts/Makefile.clang
index f88ceb3d076e..94c9455adf59 100644
--- a/scripts/Makefile.clang
+++ b/scripts/Makefile.clang
@@ -12,7 +12,9 @@ CLANG_TARGET_FLAGS_s390               := s390x-linux-gnu
 CLANG_TARGET_FLAGS_x86         := x86_64-linux-gnu
 CLANG_TARGET_FLAGS             := $(CLANG_TARGET_FLAGS_$(SRCARCH))

+# Make clang behave more like gcc when it encounters an unknown '-W' or '-f' flag.
 TENTATIVE_CLANG_FLAGS := -Werror=unknown-warning-option
+TENTATIVE_CLANG_FLAGS += -Werror=ignored-optimization-argument

 ifeq ($(CROSS_COMPILE),)
 ifeq ($(CLANG_TARGET_FLAGS),)

Sorry for the wall of text, hopefully it all makes sense.

Cheers,
Nathan


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [linux-next:master 6632/9522] include/linux/pm_opp.h:458:58: warning: unused parameter 'dev'
@ 2021-08-23 20:28       ` Nathan Chancellor
  0 siblings, 0 replies; 8+ messages in thread
From: Nathan Chancellor @ 2021-08-23 20:28 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 8482 bytes --]

On Mon, Aug 23, 2021 at 11:07:13AM +0200, Arnd Bergmann wrote:
> On Mon, Aug 23, 2021 at 5:15 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> >
> > On 21-08-21, 03:30, kernel test robot wrote:
> > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > > head:   86ed57fd8c93fdfaabb4f58e78455180fa7d8a84
> > > commit: c17495b01b72b53bd290f442d39b060e015c7aea [6632/9522] cpufreq: Add callback to register with energy model
> > > config: i386-randconfig-a016-20210820 (attached as .config)
> > > compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d9c5613e856cf2addfbf892fc4c1ce9ef9feceaa)
> > > 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://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c17495b01b72b53bd290f442d39b060e015c7aea
> > >         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> > >         git fetch --no-tags linux-next master
> > >         git checkout c17495b01b72b53bd290f442d39b060e015c7aea
> > >         # save the attached .config to linux build tree
> > >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
> > >
> > > If you fix the issue, kindly add following tag as appropriate
> > > Reported-by: kernel test robot <lkp@intel.com>
> > >
> > > All warnings (new ones prefixed by >>):
> > >
> > >    static inline void pm_vt_switch_unregister(struct device *dev)
> > >                                                              ^
> > >    In file included from drivers/gpu/drm/i915/gt/intel_llc.c:6:
> > >    In file included from include/linux/cpufreq.h:12:
> > >    In file included from include/linux/cpu.h:17:
> > >    In file included from include/linux/node.h:18:
> > >    include/linux/device.h:653:46: warning: unused parameter 'dev' [-Wunused-parameter]
> > >    static inline int dev_to_node(struct device *dev)
> >
> > False positives ? These are mostly inline dummies, which simply return
> > errors. Their parameters aren't supposed to be used.
> 
> It's a clang-14 W=1 build, probably something went wrong with the clang specific
> warning flags there. I think we do want "-Wunused -Wno-unused-parameter". Not
> sure what changed compared to older clang builds.

W=1 already does this:

$ sed -n '23,25p' scripts/Makefile.extrawarn
ifneq ($(findstring 1, $(KBUILD_EXTRA_WARN)),)

KBUILD_CFLAGS += -Wextra -Wunused -Wno-unused-parameter

The problem is the same one as commit fa63da2ab046 ("arm64: Don't
unconditionally add -Wno-psabi to KBUILD_CFLAGS") but just with an '-f'
flag instead of a '-W' flag.

This config has CONFIG_MEFFICEON=y, which adds a few '-falign-...' flags
to cflags-y, namely '-falign-jumps=0', which is not supported by clang:

clang-14: warning: optimization flag '-falign-jumps=0' is not supported [-Wignored-optimization-argument]

As a result, all subsequent cc-{disable-warning,option} calls fail because the
command always fails with an unknown flag in the mix since we added -Werror to
cc-{disable-warning,option} to work around this exact situation where clang
only emits a warning rather than an error for unknown flags.  I improved this
in commit 589834b3a009 ("kbuild: Add -Werror=unknown-warning-option to
CLANG_FLAGS") so that we get alerted of failed flags before this but I guess I
missed this one :).

i915 enables '-Wall -Wextra' then disables a few warnings (including
'-Wunused-parameter') with cc-disable-warning, which does not work, so we get
all of these warnings as a result.

I think fixing this once and for all is a three pronged approach:

1. '-falign-jumps=' should not be added unconditionally, as it is not
   supported in clang (as it warns rather than errors about...).
   '-falign-loops=' falls into the same category, as it is only
   supported on clang-14 and newer.

   Something like this should do it (no point in making GCC pay the
   cc-option cost):

diff --git a/arch/x86/Makefile_32.cpu b/arch/x86/Makefile_32.cpu
index cd3056759880..1db40f14719d 100644
--- a/arch/x86/Makefile_32.cpu
+++ b/arch/x86/Makefile_32.cpu
@@ -25,11 +25,16 @@ cflags-$(CONFIG_MK6)                += -march=k6
 # They make zero difference whatsosever to performance at this time.
 cflags-$(CONFIG_MK7)           += -march=athlon
 cflags-$(CONFIG_MK8)           += $(call cc-option,-march=k8,-march=athlon)
-cflags-$(CONFIG_MCRUSOE)       += -march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0
-cflags-$(CONFIG_MEFFICEON)     += -march=i686 $(call tune,pentium3) -falign-functions=0 -falign-jumps=0 -falign-loops=0
+ifdef CONFIG_CC_IS_CLANG
+align := -falign-functions=0 $(call cc-option,-falign-jumps=0) $(call cc-option,-falign-loops=0)
+else
+align := -falign-functions=0 -falign-jumps=0 -falign-loops=0
+endif
+cflags-$(CONFIG_MCRUSOE)       += -march=i686 $(align)
+cflags-$(CONFIG_MEFFICEON)     += -march=i686 $(call tune,pentium3) $(align)
 cflags-$(CONFIG_MWINCHIPC6)    += $(call cc-option,-march=winchip-c6,-march=i586)
 cflags-$(CONFIG_MWINCHIP3D)    += $(call cc-option,-march=winchip2,-march=i586)
-cflags-$(CONFIG_MCYRIXIII)     += $(call cc-option,-march=c3,-march=i486) -falign-functions=0 -falign-jumps=0 -falign-loops=0
+cflags-$(CONFIG_MCYRIXIII)     += $(call cc-option,-march=c3,-march=i486) $(align)
 cflags-$(CONFIG_MVIAC3_2)      += $(call cc-option,-march=c3-2,-march=i686)
 cflags-$(CONFIG_MVIAC7)                += -march=i686
 cflags-$(CONFIG_MCORE2)                += -march=i686 $(call tune,core2)

2. i915 should not be using cc-disable-warning for most of the flags
   that they are, as they are supported by both compilers and the rest
   of the kernel assumes this. I plan to send a series to turn on
   -Wsometimes-uninitialized for i195 shortly so I will send this diff
   as a prior change in that series.

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 642a5b5a1b81..9f05b3b18816 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -13,15 +13,16 @@
 # will most likely get a sudden build breakage... Hopefully we will fix
 # new warnings before CI updates!
 subdir-ccflags-y := -Wall -Wextra
-subdir-ccflags-y += $(call cc-disable-warning, unused-parameter)
-subdir-ccflags-y += $(call cc-disable-warning, type-limits)
-subdir-ccflags-y += $(call cc-disable-warning, missing-field-initializers)
+subdir-ccflags-y += -Wno-unused-parameter
+subdir-ccflags-y += -Wno-type-limits
+subdir-ccflags-y += -Wno-missing-field-initializers
 subdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
-# clang warnings
-subdir-ccflags-y += $(call cc-disable-warning, sign-compare)
-subdir-ccflags-y += $(call cc-disable-warning, sometimes-uninitialized)
-subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides)
 subdir-ccflags-y += $(call cc-disable-warning, frame-address)
+ifdef CONFIG_CC_IS_CLANG
+subdir-ccflags-y += -Wno-sign-compare
+subdir-ccflags-y += -Wno-sometimes-uninitialized
+subdir-ccflags-y += -Wno-initializer-overrides
+endif
 subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror

 # Fine grained warnings disable

3. We should not allow unknown flags to get added to the command line
   without our knowledge. Bugs like this are annoying for several
   parties so we should minimize them as much as possible. I will
   propose this in the same series as the first diff, which should avoid
   the initial issue altogether (the second step is more of an
   optimization for the future).

diff --git a/scripts/Makefile.clang b/scripts/Makefile.clang
index f88ceb3d076e..94c9455adf59 100644
--- a/scripts/Makefile.clang
+++ b/scripts/Makefile.clang
@@ -12,7 +12,9 @@ CLANG_TARGET_FLAGS_s390               := s390x-linux-gnu
 CLANG_TARGET_FLAGS_x86         := x86_64-linux-gnu
 CLANG_TARGET_FLAGS             := $(CLANG_TARGET_FLAGS_$(SRCARCH))

+# Make clang behave more like gcc when it encounters an unknown '-W' or '-f' flag.
 TENTATIVE_CLANG_FLAGS := -Werror=unknown-warning-option
+TENTATIVE_CLANG_FLAGS += -Werror=ignored-optimization-argument

 ifeq ($(CROSS_COMPILE),)
 ifeq ($(CLANG_TARGET_FLAGS),)

Sorry for the wall of text, hopefully it all makes sense.

Cheers,
Nathan

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-08-23 20:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-20 19:30 [linux-next:master 6632/9522] include/linux/pm_opp.h:458:58: warning: unused parameter 'dev' kernel test robot
2021-08-20 19:30 ` kernel test robot
2021-08-23  3:15 ` Viresh Kumar
2021-08-23  3:15   ` Viresh Kumar
2021-08-23  9:07   ` Arnd Bergmann
2021-08-23  9:07     ` Arnd Bergmann
2021-08-23 20:28     ` Nathan Chancellor
2021-08-23 20:28       ` Nathan Chancellor

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.