lkml.org 
[lkml]   [2021]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdrivers/opp/of.c:842:12: warning: stack frame size of 2064 bytes in function '_of_add_opp_table_v2'
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 61556703b610a104de324e4f061dc6cf7b218b46
commit: 0ff25c99042a56cd1580b381dd747a56286489cd opp: Allow opp-supported-hw to contain multiple versions
date: 5 months ago
config: powerpc64-randconfig-r025-20210205 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0ff25c99042a56cd1580b381dd747a56286489cd
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 0ff25c99042a56cd1580b381dd747a56286489cd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64

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 >>):

>> drivers/opp/of.c:842:12: warning: stack frame size of 2064 bytes in function '_of_add_opp_table_v2' [-Wframe-larger-than=]
static int _of_add_opp_table_v2(struct device *dev, struct opp_table *opp_table)
^
1 warning generated.


vim +/_of_add_opp_table_v2 +842 drivers/opp/of.c

f47b72a15a9679 drivers/base/power/opp/of.c Viresh Kumar 2016-05-05 840
f47b72a15a9679 drivers/base/power/opp/of.c Viresh Kumar 2016-05-05 841 /* Initializes OPP tables based on new bindings */
5ed4cecd75e902 drivers/opp/of.c Viresh Kumar 2018-09-12 @842 static int _of_add_opp_table_v2(struct device *dev, struct opp_table *opp_table)
f47b72a15a9679 drivers/base/power/opp/of.c Viresh Kumar 2016-05-05 843 {
f47b72a15a9679 drivers/base/power/opp/of.c Viresh Kumar 2016-05-05 844 struct device_node *np;
283d55e68d8a0f drivers/opp/of.c Viresh Kumar 2018-09-07 845 int ret, count = 0, pstate_count = 0;
3ba98324e81add drivers/opp/of.c Viresh Kumar 2016-11-18 846 struct dev_pm_opp *opp;
f47b72a15a9679 drivers/base/power/opp/of.c Viresh Kumar 2016-05-05 847
283d55e68d8a0f drivers/opp/of.c Viresh Kumar 2018-09-07 848 /* OPP table is already initialized for the device */
03758d60265c77 drivers/opp/of.c Viresh Kumar 2019-11-11 849 mutex_lock(&opp_table->lock);
cdd6ed90cdb6c2 drivers/opp/of.c Viresh Kumar 2018-09-12 850 if (opp_table->parsed_static_opps) {
03758d60265c77 drivers/opp/of.c Viresh Kumar 2019-11-11 851 opp_table->parsed_static_opps++;
03758d60265c77 drivers/opp/of.c Viresh Kumar 2019-11-11 852 mutex_unlock(&opp_table->lock);
cdd6ed90cdb6c2 drivers/opp/of.c Viresh Kumar 2018-09-12 853 return 0;
cdd6ed90cdb6c2 drivers/opp/of.c Viresh Kumar 2018-09-12 854 }
f06ed90e7051a3 drivers/opp/of.c Viresh Kumar 2018-06-14 855
03758d60265c77 drivers/opp/of.c Viresh Kumar 2019-11-11 856 opp_table->parsed_static_opps = 1;
03758d60265c77 drivers/opp/of.c Viresh Kumar 2019-11-11 857 mutex_unlock(&opp_table->lock);
b19c23551be8de drivers/opp/of.c Viresh Kumar 2019-10-18 858
f47b72a15a9679 drivers/base/power/opp/of.c Viresh Kumar 2016-05-05 859 /* We have opp-table node now, iterate over it and add OPPs */
5ed4cecd75e902 drivers/opp/of.c Viresh Kumar 2018-09-12 860 for_each_available_child_of_node(opp_table->np, np) {
deac8703da5faa drivers/opp/of.c Dave Gerlach 2018-10-03 861 opp = _opp_add_static_v2(opp_table, dev, np);
deac8703da5faa drivers/opp/of.c Dave Gerlach 2018-10-03 862 if (IS_ERR(opp)) {
deac8703da5faa drivers/opp/of.c Dave Gerlach 2018-10-03 863 ret = PTR_ERR(opp);
f47b72a15a9679 drivers/base/power/opp/of.c Viresh Kumar 2016-05-05 864 dev_err(dev, "%s: Failed to add OPP, %d\n", __func__,
f47b72a15a9679 drivers/base/power/opp/of.c Viresh Kumar 2016-05-05 865 ret);
7978db344719da drivers/opp/of.c Tobias Jordan 2017-10-04 866 of_node_put(np);
03758d60265c77 drivers/opp/of.c Viresh Kumar 2019-11-11 867 goto remove_static_opp;
deac8703da5faa drivers/opp/of.c Dave Gerlach 2018-10-03 868 } else if (opp) {
deac8703da5faa drivers/opp/of.c Dave Gerlach 2018-10-03 869 count++;
f47b72a15a9679 drivers/base/power/opp/of.c Viresh Kumar 2016-05-05 870 }
f47b72a15a9679 drivers/base/power/opp/of.c Viresh Kumar 2016-05-05 871 }
f47b72a15a9679 drivers/base/power/opp/of.c Viresh Kumar 2016-05-05 872
f47b72a15a9679 drivers/base/power/opp/of.c Viresh Kumar 2016-05-05 873 /* There should be one of more OPP defined */
ba0033192145cb drivers/opp/of.c Viresh Kumar 2019-11-18 874 if (WARN_ON(!count)) {
ba0033192145cb drivers/opp/of.c Viresh Kumar 2019-11-18 875 ret = -ENOENT;
03758d60265c77 drivers/opp/of.c Viresh Kumar 2019-11-11 876 goto remove_static_opp;
ba0033192145cb drivers/opp/of.c Viresh Kumar 2019-11-18 877 }
f47b72a15a9679 drivers/base/power/opp/of.c Viresh Kumar 2016-05-05 878
3ba98324e81add drivers/opp/of.c Viresh Kumar 2016-11-18 879 list_for_each_entry(opp, &opp_table->opp_list, node)
3ba98324e81add drivers/opp/of.c Viresh Kumar 2016-11-18 880 pstate_count += !!opp->pstate;
3ba98324e81add drivers/opp/of.c Viresh Kumar 2016-11-18 881
3ba98324e81add drivers/opp/of.c Viresh Kumar 2016-11-18 882 /* Either all or none of the nodes shall have performance state set */
3ba98324e81add drivers/opp/of.c Viresh Kumar 2016-11-18 883 if (pstate_count && pstate_count != count) {
3ba98324e81add drivers/opp/of.c Viresh Kumar 2016-11-18 884 dev_err(dev, "Not all nodes have performance state set (%d: %d)\n",
3ba98324e81add drivers/opp/of.c Viresh Kumar 2016-11-18 885 count, pstate_count);
ba0033192145cb drivers/opp/of.c Viresh Kumar 2019-11-18 886 ret = -ENOENT;
03758d60265c77 drivers/opp/of.c Viresh Kumar 2019-11-11 887 goto remove_static_opp;
3ba98324e81add drivers/opp/of.c Viresh Kumar 2016-11-18 888 }
3ba98324e81add drivers/opp/of.c Viresh Kumar 2016-11-18 889
3ba98324e81add drivers/opp/of.c Viresh Kumar 2016-11-18 890 if (pstate_count)
3ba98324e81add drivers/opp/of.c Viresh Kumar 2016-11-18 891 opp_table->genpd_performance_state = true;
3ba98324e81add drivers/opp/of.c Viresh Kumar 2016-11-18 892
cdd6ed90cdb6c2 drivers/opp/of.c Viresh Kumar 2018-09-12 893 return 0;
ba0033192145cb drivers/opp/of.c Viresh Kumar 2019-11-18 894
03758d60265c77 drivers/opp/of.c Viresh Kumar 2019-11-11 895 remove_static_opp:
03758d60265c77 drivers/opp/of.c Viresh Kumar 2019-11-11 896 _opp_remove_all_static(opp_table);
ba0033192145cb drivers/opp/of.c Viresh Kumar 2019-11-18 897
ba0033192145cb drivers/opp/of.c Viresh Kumar 2019-11-18 898 return ret;
f47b72a15a9679 drivers/base/power/opp/of.c Viresh Kumar 2016-05-05 899 }
f47b72a15a9679 drivers/base/power/opp/of.c Viresh Kumar 2016-05-05 900

:::::: The code at line 842 was first introduced by commit
:::::: 5ed4cecd75e90232a19afa502cf477925854561e OPP: Pass OPP table to _of_add_opp_table_v{1|2}()

:::::: TO: Viresh Kumar <viresh.kumar@linaro.org>
:::::: CC: Viresh Kumar <viresh.kumar@linaro.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-02-06 21:11    [W:0.045 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site