From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [vireshk-pm:opp/cleanup 5/6] drivers/opp/core.c:2950 dev_pm_opp_sync_regulators() warn: iterator 'i' not incremented
Date: Thu, 8 May 2025 00:54:17 +0800 [thread overview]
Message-ID: <202505080037.DaApZwGO-lkp@intel.com> (raw)
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
reply other threads:[~2025-05-07 16:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202505080037.DaApZwGO-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.