drivers/opp/core.c:2181: warning: Function parameter or member 'opp_table' not described in '_opp_set_clknames'

From: kernel test robot
Date: Sat Sep 09 2023 - 08:08:51 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6099776f9f268e61fe5ecd721f994a8cfce5306f
commit: 2368f57685768f9f9cd666eaa4194a359d89afb8 OPP: Migrate set-clk-name API to use set-config helpers
date: 1 year, 2 months ago
config: csky-defconfig (https://download.01.org/0day-ci/archive/20230909/202309092008.fU1U8cHe-lkp@xxxxxxxxx/config)
compiler: csky-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230909/202309092008.fU1U8cHe-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309092008.fU1U8cHe-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

drivers/opp/core.c:1967: warning: Function parameter or member 'opp_table' not described in '_opp_set_supported_hw'
drivers/opp/core.c:1967: warning: Excess function parameter 'dev' description in '_opp_set_supported_hw'
drivers/opp/core.c:2068: warning: Function parameter or member 'opp_table' not described in '_opp_set_regulators'
drivers/opp/core.c:2068: warning: Excess function parameter 'count' description in '_opp_set_regulators'
>> drivers/opp/core.c:2181: warning: Function parameter or member 'opp_table' not described in '_opp_set_clknames'
drivers/opp/core.c:2653: warning: Function parameter or member 'token' not described in 'dev_pm_opp_clear_config'
drivers/opp/core.c:2653: warning: Excess function parameter 'opp_table' description in 'dev_pm_opp_clear_config'


vim +2181 drivers/opp/core.c

32aee78bc5184c drivers/opp/core.c Yangtao Li 2021-03-14 2165
829a4e8c0e9aab drivers/base/power/opp/core.c Viresh Kumar 2017-06-21 2166 /**
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2167 * _opp_set_clknames() - Set clk names for the device
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2168 * @dev: Device for which clk names is being set.
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2169 * @names: Clk names.
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2170 *
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2171 * In order to support OPP switching, OPP layer needs to get pointers to the
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2172 * clocks for the device. Simple cases work fine without using this routine
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2173 * (i.e. by passing connection-id as NULL), but for a device with multiple
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2174 * clocks available, the OPP core needs to know the exact names of the clks to
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2175 * use.
829a4e8c0e9aab drivers/base/power/opp/core.c Viresh Kumar 2017-06-21 2176 *
829a4e8c0e9aab drivers/base/power/opp/core.c Viresh Kumar 2017-06-21 2177 * This must be called before any OPPs are initialized for the device.
829a4e8c0e9aab drivers/base/power/opp/core.c Viresh Kumar 2017-06-21 2178 */
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2179 static int _opp_set_clknames(struct opp_table *opp_table, struct device *dev,
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2180 const char * const names[])
829a4e8c0e9aab drivers/base/power/opp/core.c Viresh Kumar 2017-06-21 @2181 {
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2182 const char * const *temp = names;
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2183 int count = 0;
829a4e8c0e9aab drivers/base/power/opp/core.c Viresh Kumar 2017-06-21 2184
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2185 /* Count number of clks */
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2186 while (*temp++)
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2187 count++;
829a4e8c0e9aab drivers/base/power/opp/core.c Viresh Kumar 2017-06-21 2188
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2189 /*
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2190 * This is a special case where we have a single clock, whose connection
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2191 * id name is NULL, i.e. first two entries are NULL in the array.
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2192 */
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2193 if (!count && !names[1])
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2194 count = 1;
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2195
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2196 /* We support only one clock name for now */
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2197 if (count != 1)
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2198 return -EINVAL;
829a4e8c0e9aab drivers/base/power/opp/core.c Viresh Kumar 2017-06-21 2199
0a43452bb6b1f4 drivers/opp/core.c Viresh Kumar 2022-05-25 2200 /* Another CPU that shares the OPP table has set the clkname ? */
0a43452bb6b1f4 drivers/opp/core.c Viresh Kumar 2022-05-25 2201 if (opp_table->clk_configured)
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2202 return 0;
0a43452bb6b1f4 drivers/opp/core.c Viresh Kumar 2022-05-25 2203
32439ac7535a8e drivers/opp/core.c Viresh Kumar 2021-01-28 2204 /* clk shouldn't be initialized at this point */
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2205 if (WARN_ON(opp_table->clk))
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2206 return -EBUSY;
829a4e8c0e9aab drivers/base/power/opp/core.c Viresh Kumar 2017-06-21 2207
829a4e8c0e9aab drivers/base/power/opp/core.c Viresh Kumar 2017-06-21 2208 /* Find clk for the device */
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2209 opp_table->clk = clk_get(dev, names[0]);
829a4e8c0e9aab drivers/base/power/opp/core.c Viresh Kumar 2017-06-21 2210 if (IS_ERR(opp_table->clk)) {
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2211 return dev_err_probe(dev, PTR_ERR(opp_table->clk),
543256d239b415 drivers/opp/core.c Krzysztof Kozlowski 2022-04-08 2212 "%s: Couldn't find clock\n", __func__);
829a4e8c0e9aab drivers/base/power/opp/core.c Viresh Kumar 2017-06-21 2213 }
829a4e8c0e9aab drivers/base/power/opp/core.c Viresh Kumar 2017-06-21 2214
0a43452bb6b1f4 drivers/opp/core.c Viresh Kumar 2022-05-25 2215 opp_table->clk_configured = true;
0a43452bb6b1f4 drivers/opp/core.c Viresh Kumar 2022-05-25 2216
2368f57685768f drivers/opp/core.c Viresh Kumar 2022-05-26 2217 return 0;
829a4e8c0e9aab drivers/base/power/opp/core.c Viresh Kumar 2017-06-21 2218 }
829a4e8c0e9aab drivers/base/power/opp/core.c Viresh Kumar 2017-06-21 2219

:::::: The code at line 2181 was first introduced by commit
:::::: 829a4e8c0e9aab17bcfe2ddb070388b8ada26292 PM / OPP: Add dev_pm_opp_{set|put}_clkname()

:::::: TO: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
:::::: CC: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki