[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202309091728.siozDgSB-lkp@intel.com>
Date: Sat, 9 Sep 2023 17:34:01 +0800
From: kernel test robot <lkp@...el.com>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Chanwoo Choi <cw00.choi@...sung.com>
Subject: drivers/opp/core.c:2113: warning: Function parameter or member
'opp_table' not described in '_opp_set_regulators'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6099776f9f268e61fe5ecd721f994a8cfce5306f
commit: b0ec09428621daee5101130c307634a390b0213b OPP: Migrate set-regulators API to use set-config helpers
date: 1 year, 2 months ago
config: csky-defconfig (https://download.01.org/0day-ci/archive/20230909/202309091728.siozDgSB-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230909/202309091728.siozDgSB-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309091728.siozDgSB-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/opp/core.c:2113: warning: Function parameter or member 'opp_table' not described in '_opp_set_regulators'
>> drivers/opp/core.c:2113: warning: Excess function parameter 'count' description in '_opp_set_regulators'
drivers/opp/core.c:2756: warning: Function parameter or member 'token' not described in 'dev_pm_opp_clear_config'
drivers/opp/core.c:2756: warning: Excess function parameter 'opp_table' description in 'dev_pm_opp_clear_config'
vim +2113 drivers/opp/core.c
01fb4d3c39d35b drivers/base/power/opp/core.c Viresh Kumar 2015-12-09 2098
9f8ea969d5cfdd drivers/base/power/opp/core.c Viresh Kumar 2016-02-09 2099 /**
b0ec09428621da drivers/opp/core.c Viresh Kumar 2022-07-04 2100 * _opp_set_regulators() - Set regulator names for the device
9f8ea969d5cfdd drivers/base/power/opp/core.c Viresh Kumar 2016-02-09 2101 * @dev: Device for which regulator name is being set.
dfbe4678d709e2 drivers/base/power/opp/core.c Viresh Kumar 2016-12-01 2102 * @names: Array of pointers to the names of the regulator.
dfbe4678d709e2 drivers/base/power/opp/core.c Viresh Kumar 2016-12-01 2103 * @count: Number of regulators.
9f8ea969d5cfdd drivers/base/power/opp/core.c Viresh Kumar 2016-02-09 2104 *
9f8ea969d5cfdd drivers/base/power/opp/core.c Viresh Kumar 2016-02-09 2105 * In order to support OPP switching, OPP layer needs to know the name of the
dfbe4678d709e2 drivers/base/power/opp/core.c Viresh Kumar 2016-12-01 2106 * device's regulators, as the core would be required to switch voltages as
dfbe4678d709e2 drivers/base/power/opp/core.c Viresh Kumar 2016-12-01 2107 * well.
9f8ea969d5cfdd drivers/base/power/opp/core.c Viresh Kumar 2016-02-09 2108 *
9f8ea969d5cfdd drivers/base/power/opp/core.c Viresh Kumar 2016-02-09 2109 * This must be called before any OPPs are initialized for the device.
9f8ea969d5cfdd drivers/base/power/opp/core.c Viresh Kumar 2016-02-09 2110 */
b0ec09428621da drivers/opp/core.c Viresh Kumar 2022-07-04 2111 static int _opp_set_regulators(struct opp_table *opp_table, struct device *dev,
87686cc845c3be drivers/opp/core.c Viresh Kumar 2022-07-04 2112 const char * const names[])
9f8ea969d5cfdd drivers/base/power/opp/core.c Viresh Kumar 2016-02-09 @2113 {
38bb34393804b7 drivers/opp/core.c Viresh Kumar 2021-01-19 2114 struct dev_pm_opp_supply *supplies;
87686cc845c3be drivers/opp/core.c Viresh Kumar 2022-07-04 2115 const char * const *temp = names;
9f8ea969d5cfdd drivers/base/power/opp/core.c Viresh Kumar 2016-02-09 2116 struct regulator *reg;
87686cc845c3be drivers/opp/core.c Viresh Kumar 2022-07-04 2117 int count = 0, ret, i;
87686cc845c3be drivers/opp/core.c Viresh Kumar 2022-07-04 2118
87686cc845c3be drivers/opp/core.c Viresh Kumar 2022-07-04 2119 /* Count number of regulators */
87686cc845c3be drivers/opp/core.c Viresh Kumar 2022-07-04 2120 while (*temp++)
87686cc845c3be drivers/opp/core.c Viresh Kumar 2022-07-04 2121 count++;
87686cc845c3be drivers/opp/core.c Viresh Kumar 2022-07-04 2122
87686cc845c3be drivers/opp/core.c Viresh Kumar 2022-07-04 2123 if (!count)
b0ec09428621da drivers/opp/core.c Viresh Kumar 2022-07-04 2124 return -EINVAL;
9f8ea969d5cfdd drivers/base/power/opp/core.c Viresh Kumar 2016-02-09 2125
779b783cfaa726 drivers/opp/core.c Viresh Kumar 2018-05-22 2126 /* Another CPU that shares the OPP table has set the regulators ? */
779b783cfaa726 drivers/opp/core.c Viresh Kumar 2018-05-22 2127 if (opp_table->regulators)
b0ec09428621da drivers/opp/core.c Viresh Kumar 2022-07-04 2128 return 0;
dfbe4678d709e2 drivers/base/power/opp/core.c Viresh Kumar 2016-12-01 2129
dfbe4678d709e2 drivers/base/power/opp/core.c Viresh Kumar 2016-12-01 2130 opp_table->regulators = kmalloc_array(count,
dfbe4678d709e2 drivers/base/power/opp/core.c Viresh Kumar 2016-12-01 2131 sizeof(*opp_table->regulators),
dfbe4678d709e2 drivers/base/power/opp/core.c Viresh Kumar 2016-12-01 2132 GFP_KERNEL);
b0ec09428621da drivers/opp/core.c Viresh Kumar 2022-07-04 2133 if (!opp_table->regulators)
b0ec09428621da drivers/opp/core.c Viresh Kumar 2022-07-04 2134 return -ENOMEM;
dfbe4678d709e2 drivers/base/power/opp/core.c Viresh Kumar 2016-12-01 2135
dfbe4678d709e2 drivers/base/power/opp/core.c Viresh Kumar 2016-12-01 2136 for (i = 0; i < count; i++) {
dfbe4678d709e2 drivers/base/power/opp/core.c Viresh Kumar 2016-12-01 2137 reg = regulator_get_optional(dev, names[i]);
9f8ea969d5cfdd drivers/base/power/opp/core.c Viresh Kumar 2016-02-09 2138 if (IS_ERR(reg)) {
543256d239b415 drivers/opp/core.c Krzysztof Kozlowski 2022-04-08 2139 ret = dev_err_probe(dev, PTR_ERR(reg),
543256d239b415 drivers/opp/core.c Krzysztof Kozlowski 2022-04-08 2140 "%s: no regulator (%s) found\n",
543256d239b415 drivers/opp/core.c Krzysztof Kozlowski 2022-04-08 2141 __func__, names[i]);
dfbe4678d709e2 drivers/base/power/opp/core.c Viresh Kumar 2016-12-01 2142 goto free_regulators;
dfbe4678d709e2 drivers/base/power/opp/core.c Viresh Kumar 2016-12-01 2143 }
dfbe4678d709e2 drivers/base/power/opp/core.c Viresh Kumar 2016-12-01 2144
dfbe4678d709e2 drivers/base/power/opp/core.c Viresh Kumar 2016-12-01 2145 opp_table->regulators[i] = reg;
9f8ea969d5cfdd drivers/base/power/opp/core.c Viresh Kumar 2016-02-09 2146 }
9f8ea969d5cfdd drivers/base/power/opp/core.c Viresh Kumar 2016-02-09 2147
dfbe4678d709e2 drivers/base/power/opp/core.c Viresh Kumar 2016-12-01 2148 opp_table->regulator_count = count;
9f8ea969d5cfdd drivers/base/power/opp/core.c Viresh Kumar 2016-02-09 2149
38bb34393804b7 drivers/opp/core.c Viresh Kumar 2021-01-19 2150 supplies = kmalloc_array(count * 2, sizeof(*supplies), GFP_KERNEL);
38bb34393804b7 drivers/opp/core.c Viresh Kumar 2021-01-19 2151 if (!supplies) {
38bb34393804b7 drivers/opp/core.c Viresh Kumar 2021-01-19 2152 ret = -ENOMEM;
947355850fcb3b drivers/base/power/opp/core.c Viresh Kumar 2016-12-01 2153 goto free_regulators;
38bb34393804b7 drivers/opp/core.c Viresh Kumar 2021-01-19 2154 }
38bb34393804b7 drivers/opp/core.c Viresh Kumar 2021-01-19 2155
38bb34393804b7 drivers/opp/core.c Viresh Kumar 2021-01-19 2156 mutex_lock(&opp_table->lock);
38bb34393804b7 drivers/opp/core.c Viresh Kumar 2021-01-19 2157 opp_table->sod_supplies = supplies;
38bb34393804b7 drivers/opp/core.c Viresh Kumar 2021-01-19 2158 if (opp_table->set_opp_data) {
38bb34393804b7 drivers/opp/core.c Viresh Kumar 2021-01-19 2159 opp_table->set_opp_data->old_opp.supplies = supplies;
38bb34393804b7 drivers/opp/core.c Viresh Kumar 2021-01-19 2160 opp_table->set_opp_data->new_opp.supplies = supplies + count;
38bb34393804b7 drivers/opp/core.c Viresh Kumar 2021-01-19 2161 }
38bb34393804b7 drivers/opp/core.c Viresh Kumar 2021-01-19 2162 mutex_unlock(&opp_table->lock);
947355850fcb3b drivers/base/power/opp/core.c Viresh Kumar 2016-12-01 2163
b0ec09428621da drivers/opp/core.c Viresh Kumar 2022-07-04 2164 return 0;
9f8ea969d5cfdd drivers/base/power/opp/core.c Viresh Kumar 2016-02-09 2165
dfbe4678d709e2 drivers/base/power/opp/core.c Viresh Kumar 2016-12-01 2166 free_regulators:
24957db1004353 drivers/opp/core.c Marek Szyprowski 2019-10-17 2167 while (i != 0)
24957db1004353 drivers/opp/core.c Marek Szyprowski 2019-10-17 2168 regulator_put(opp_table->regulators[--i]);
dfbe4678d709e2 drivers/base/power/opp/core.c Viresh Kumar 2016-12-01 2169
dfbe4678d709e2 drivers/base/power/opp/core.c Viresh Kumar 2016-12-01 2170 kfree(opp_table->regulators);
dfbe4678d709e2 drivers/base/power/opp/core.c Viresh Kumar 2016-12-01 2171 opp_table->regulators = NULL;
46f48aca2e5aef drivers/opp/core.c Viresh Kumar 2018-12-11 2172 opp_table->regulator_count = -1;
9f8ea969d5cfdd drivers/base/power/opp/core.c Viresh Kumar 2016-02-09 2173
b0ec09428621da drivers/opp/core.c Viresh Kumar 2022-07-04 2174 return ret;
9f8ea969d5cfdd drivers/base/power/opp/core.c Viresh Kumar 2016-02-09 2175 }
9f8ea969d5cfdd drivers/base/power/opp/core.c Viresh Kumar 2016-02-09 2176
:::::: The code at line 2113 was first introduced by commit
:::::: 9f8ea969d5cfdd4353d2adb004e8e2286b984369 PM / OPP: get/put regulators from OPP core
:::::: TO: Viresh Kumar <viresh.kumar@...aro.org>
:::::: CC: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists