All of lore.kernel.org
 help / color / mirror / Atom feed
* [vireshk-pm:opp/cleanup 5/6] drivers/opp/core.c:2950 dev_pm_opp_sync_regulators() warn: iterator 'i' not incremented
@ 2025-05-07 16:54 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-05-07 16:54 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Viresh Kumar <viresh.kumar@linaro.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git opp/cleanup
head:   cb4bdf07e512e39af4c9142679c1361ce76e9336
commit: 5330d0dab7367f7e17911dfa82a6712de27aa968 [5/6] OPP: Define and use scope-based cleanup helpers
:::::: branch date: 13 days ago
:::::: commit date: 13 days ago
config: i386-randconfig-141-20250429 (https://download.01.org/0day-ci/archive/20250508/202505080037.DaApZwGO-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0

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@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202505080037.DaApZwGO-lkp@intel.com/

smatch warnings:
drivers/opp/core.c:2950 dev_pm_opp_sync_regulators() warn: iterator 'i' not incremented

vim +/i +2950 drivers/opp/core.c

25cb20a212a1f9 Stephen Boyd 2019-10-16  2922  
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2923  /**
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2924   * dev_pm_opp_sync_regulators() - Sync state of voltage regulators
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2925   * @dev:	device for which we do this operation
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2926   *
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2927   * Sync voltage state of the OPP table regulators.
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2928   *
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2929   * Return: 0 on success or a negative error value.
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2930   */
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2931  int dev_pm_opp_sync_regulators(struct device *dev)
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2932  {
5330d0dab7367f Viresh Kumar 2025-04-23  2933  	struct opp_table *opp_table __free(put_opp_table);
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2934  	struct regulator *reg;
5330d0dab7367f Viresh Kumar 2025-04-23  2935  	int i;
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2936  
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2937  	/* Device may not have OPP table */
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2938  	opp_table = _find_opp_table(dev);
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2939  	if (IS_ERR(opp_table))
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2940  		return 0;
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2941  
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2942  	/* Regulator may not be required for the device */
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2943  	if (unlikely(!opp_table->regulators))
5330d0dab7367f Viresh Kumar 2025-04-23  2944  		return 0;
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2945  
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2946  	/* Nothing to sync if voltage wasn't changed */
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2947  	if (!opp_table->enabled)
5330d0dab7367f Viresh Kumar 2025-04-23  2948  		return 0;
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2949  
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03 @2950  	for (i = 0; i < opp_table->regulator_count; i++) {
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2951  		reg = opp_table->regulators[i];
5330d0dab7367f Viresh Kumar 2025-04-23  2952  		return regulator_sync_voltage(reg);
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2953  	}
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2954  
5330d0dab7367f Viresh Kumar 2025-04-23  2955  	return 0;
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2956  }
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2957  EXPORT_SYMBOL_GPL(dev_pm_opp_sync_regulators);
0b40dd3bcfc6f5 Viresh Kumar 2024-01-03  2958  

:::::: The code at line 2950 was first introduced by commit
:::::: 0b40dd3bcfc6f521e6ac0e297ecdcc391d5cc4bb OPP: Relocate dev_pm_opp_sync_regulators()

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

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-05-07 16:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-07 16:54 [vireshk-pm:opp/cleanup 5/6] drivers/opp/core.c:2950 dev_pm_opp_sync_regulators() warn: iterator 'i' not incremented kernel test robot

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.