All of lore.kernel.org
 help / color / mirror / Atom feed
* [krzk-github:n/qcom-ufs-opp-v3 10/13] drivers/opp/core.c:1335:2: warning: Undefined or garbage value returned to caller [clang-analyzer-core.uninitialized.UndefReturn]
@ 2022-05-10 15:15 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-05-10 15:15 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 26917 bytes --]

CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Krzysztof Kozlowski <krzk@kernel.org>

tree:   https://github.com/krzk/linux n/qcom-ufs-opp-v3
head:   22a49fd92d5e31234d4174cdf1fdade79f38ae3d
commit: ff3c34983e1cca80d8c081ea99e0117c5c38c6c3 [10/13] PM: opp: allow control of multiple clocks
:::::: branch date: 28 hours ago
:::::: commit date: 31 hours ago
config: i386-randconfig-c001-20220509 (https://download.01.org/0day-ci/archive/20220510/202205102304.LwSva9Cx-lkp(a)intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 18dd123c56754edf62c7042dcf23185c3727610f)
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
        # https://github.com/krzk/linux/commit/ff3c34983e1cca80d8c081ea99e0117c5c38c6c3
        git remote add krzk-github https://github.com/krzk/linux
        git fetch --no-tags krzk-github n/qcom-ufs-opp-v3
        git checkout ff3c34983e1cca80d8c081ea99e0117c5c38c6c3
        # save the config file
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 clang-analyzer 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


clang-analyzer warnings: (new ones prefixed by >>)
                   ^~~~~~~~
   drivers/firmware/efi/efi.c:792:3: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
                   snprintf(pos, size,
                   ^~~~~~~~
   drivers/firmware/efi/efi.c:792:3: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
                   snprintf(pos, size,
                   ^~~~~~~~
   Suppressed 41 warnings (40 in non-user code, 1 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   41 warnings generated.
   drivers/pinctrl/intel/pinctrl-intel.c:1149:15: warning: Value stored to 'pin' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           unsigned int pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), NULL, NULL);
                        ^~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pinctrl/intel/pinctrl-intel.c:1149:15: note: Value stored to 'pin' during its initialization is never read
           unsigned int pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), NULL, NULL);
                        ^~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pinctrl/intel/pinctrl-intel.c:1745:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct device *dev = pctrl->dev;
                          ^~~   ~~~~~~~~~~
   drivers/pinctrl/intel/pinctrl-intel.c:1745:17: note: Value stored to 'dev' during its initialization is never read
           struct device *dev = pctrl->dev;
                          ^~~   ~~~~~~~~~~
   drivers/pinctrl/intel/pinctrl-intel.c:1765:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct device *dev = pctrl->dev;
                          ^~~   ~~~~~~~~~~
   drivers/pinctrl/intel/pinctrl-intel.c:1765:17: note: Value stored to 'dev' during its initialization is never read
           struct device *dev = pctrl->dev;
                          ^~~   ~~~~~~~~~~
   drivers/pinctrl/intel/pinctrl-intel.c:1777:15: warning: Value stored to 'n' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           unsigned int n = reg / sizeof(u32);
                        ^   ~~~~~~~~~~~~~~~~~
   drivers/pinctrl/intel/pinctrl-intel.c:1777:15: note: Value stored to 'n' during its initialization is never read
           unsigned int n = reg / sizeof(u32);
                        ^   ~~~~~~~~~~~~~~~~~
   drivers/pinctrl/intel/pinctrl-intel.c:1778:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct device *dev = pctrl->dev;
                          ^~~   ~~~~~~~~~~
   drivers/pinctrl/intel/pinctrl-intel.c:1778:17: note: Value stored to 'dev' during its initialization is never read
           struct device *dev = pctrl->dev;
                          ^~~   ~~~~~~~~~~
   Suppressed 36 warnings (36 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   36 warnings generated.
   Suppressed 36 warnings (36 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   36 warnings generated.
   Suppressed 36 warnings (36 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   36 warnings generated.
   Suppressed 36 warnings (36 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   45 warnings generated.
   drivers/i3c/master/mipi-i3c-hci/core.c:145:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           memset(&info, 0, sizeof(info));
           ^
   arch/x86/include/asm/string_32.h:195:29: note: expanded from macro 'memset'
   #define memset(s, c, count) __builtin_memset(s, c, count)
                               ^~~~~~~~~~~~~~~~
   drivers/i3c/master/mipi-i3c-hci/core.c:145:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
           memset(&info, 0, sizeof(info));
           ^
   arch/x86/include/asm/string_32.h:195:29: note: expanded from macro 'memset'
   #define memset(s, c, count) __builtin_memset(s, c, count)
                               ^~~~~~~~~~~~~~~~
   Suppressed 44 warnings (44 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   45 warnings generated.
   drivers/i3c/master/mipi-i3c-hci/ext_caps.c:78:7: warning: Value stored to 'mode_entry' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
                   u32 mode_entry = readl(base);
                       ^~~~~~~~~~
   drivers/i3c/master/mipi-i3c-hci/ext_caps.c:78:7: note: Value stored to 'mode_entry' during its initialization is never read
                   u32 mode_entry = readl(base);
                       ^~~~~~~~~~
   Suppressed 44 warnings (44 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   48 warnings generated.
   drivers/opp/core.c:1034:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
                   memcpy(data->old_opp.supplies, old_opp->supplies, size);
                   ^
   arch/x86/include/asm/string_32.h:150:25: note: expanded from macro 'memcpy'
   #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
                           ^~~~~~~~~~~~~~~~
   drivers/opp/core.c:1034:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
                   memcpy(data->old_opp.supplies, old_opp->supplies, size);
                   ^
   arch/x86/include/asm/string_32.h:150:25: note: expanded from macro 'memcpy'
   #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
                           ^~~~~~~~~~~~~~~~
   drivers/opp/core.c:1035:3: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
                   memcpy(data->new_opp.supplies, opp->supplies, size);
                   ^
   arch/x86/include/asm/string_32.h:150:25: note: expanded from macro 'memcpy'
   #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
                           ^~~~~~~~~~~~~~~~
   drivers/opp/core.c:1035:3: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
                   memcpy(data->new_opp.supplies, opp->supplies, size);
                   ^
   arch/x86/include/asm/string_32.h:150:25: note: expanded from macro 'memcpy'
   #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
                           ^~~~~~~~~~~~~~~~
>> drivers/opp/core.c:1335:2: warning: Undefined or garbage value returned to caller [clang-analyzer-core.uninitialized.UndefReturn]
           return ret;
           ^      ~~~
   drivers/opp/core.c:1280:2: note: 'ret' declared without an initial value
           int ret;
           ^~~~~~~
   drivers/opp/core.c:1283:2: note: Taking false branch
           if (IS_ERR(opp_table)) {
           ^
   drivers/opp/core.c:1288:6: note: Assuming 'target_freq' is not equal to 0
           if (target_freq) {
               ^~~~~~~~~~~
   drivers/opp/core.c:1288:2: note: Taking true branch
           if (target_freq) {
           ^
   drivers/opp/core.c:1296:7: note: Assuming the condition is true
                   if (!_get_opp_count(opp_table)) {
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/opp/core.c:1296:3: note: Taking true branch
                   if (!_get_opp_count(opp_table)) {
                   ^
   drivers/opp/core.c:1297:8: note: Assuming field 'clks' is null
                           if (opp_table->clks)
                               ^~~~~~~~~~~~~~~
   drivers/opp/core.c:1297:4: note: Taking false branch
                           if (opp_table->clks)
                           ^
   drivers/opp/core.c:1301:4: note: Control jumps to line 1334
                           goto put_opp_table;
                           ^
   drivers/opp/core.c:1335:2: note: Undefined or garbage value returned to caller
           return ret;
           ^      ~~~
   Suppressed 45 warnings (44 in non-user code, 1 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   43 warnings generated.
   drivers/of/address.c:89:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           memset(addr, 0, na * 4);
           ^
   arch/x86/include/asm/string_32.h:195:29: note: expanded from macro 'memset'
   #define memset(s, c, count) __builtin_memset(s, c, count)
                               ^~~~~~~~~~~~~~~~
   drivers/of/address.c:89:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
           memset(addr, 0, na * 4);
           ^
   arch/x86/include/asm/string_32.h:195:29: note: expanded from macro 'memset'
   #define memset(s, c, count) __builtin_memset(s, c, count)
                               ^~~~~~~~~~~~~~~~
   drivers/of/address.c:430:3: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
                   memset(addr, 0, pna * 4);
                   ^
   arch/x86/include/asm/string_32.h:195:29: note: expanded from macro 'memset'
   #define memset(s, c, count) __builtin_memset(s, c, count)
                               ^~~~~~~~~~~~~~~~
   drivers/of/address.c:430:3: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
                   memset(addr, 0, pna * 4);
                   ^
   arch/x86/include/asm/string_32.h:195:29: note: expanded from macro 'memset'
   #define memset(s, c, count) __builtin_memset(s, c, count)
                               ^~~~~~~~~~~~~~~~
   drivers/of/address.c:449:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           memcpy(addr, ranges + na, 4 * pna);
           ^
   arch/x86/include/asm/string_32.h:150:25: note: expanded from macro 'memcpy'
   #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
                           ^~~~~~~~~~~~~~~~
   drivers/of/address.c:449:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
           memcpy(addr, ranges + na, 4 * pna);
           ^
   arch/x86/include/asm/string_32.h:150:25: note: expanded from macro 'memcpy'
   #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
                           ^~~~~~~~~~~~~~~~
   drivers/of/address.c:502:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           memcpy(addr, in_addr, na * 4);
           ^
   arch/x86/include/asm/string_32.h:150:25: note: expanded from macro 'memcpy'
   #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
                           ^~~~~~~~~~~~~~~~
   drivers/of/address.c:502:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
           memcpy(addr, in_addr, na * 4);
           ^
   arch/x86/include/asm/string_32.h:150:25: note: expanded from macro 'memcpy'
   #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
                           ^~~~~~~~~~~~~~~~
   drivers/of/address.c:820:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
           memset(r, 0, sizeof(struct resource));
           ^
   arch/x86/include/asm/string_32.h:195:29: note: expanded from macro 'memset'
   #define memset(s, c, count) __builtin_memset(s, c, count)
                               ^~~~~~~~~~~~~~~~
   drivers/of/address.c:820:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
           memset(r, 0, sizeof(struct resource));
           ^
   arch/x86/include/asm/string_32.h:195:29: note: expanded from macro 'memset'
   #define memset(s, c, count) __builtin_memset(s, c, count)
                               ^~~~~~~~~~~~~~~~
   Suppressed 38 warnings (38 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
   45 warnings generated.
   Suppressed 45 warnings (45 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.

vim +1335 drivers/opp/core.c

386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1263  
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1264  /**
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1265   * dev_pm_opp_set_rate() - Configure new OPP based on frequency
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1266   * @dev:	 device for which we do this operation
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1267   * @target_freq: frequency to achieve
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1268   *
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1269   * This configures the power-supplies to the levels specified by the OPP
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1270   * corresponding to the target_freq, and programs the clock to a value <=
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1271   * target_freq, as rounded by clk_round_rate(). Device wanting to run@fmax
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1272   * provided by the opp, should have already rounded to the target OPP's
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1273   * frequency.
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1274   */
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1275  int dev_pm_opp_set_rate(struct device *dev, unsigned long target_freq)
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1276  {
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1277  	struct opp_table *opp_table;
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1278  	unsigned long freq = 0, temp_freq;
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1279  	struct dev_pm_opp *opp = NULL;
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1280  	int ret;
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1281  
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1282  	opp_table = _find_opp_table(dev);
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1283  	if (IS_ERR(opp_table)) {
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1284  		dev_err(dev, "%s: device's opp table doesn't exist\n", __func__);
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1285  		return PTR_ERR(opp_table);
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1286  	}
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1287  
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1288  	if (target_freq) {
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1289  		/*
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1290  		 * For IO devices which require an OPP on some platforms/SoCs
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1291  		 * while just needing to scale the clock on some others
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1292  		 * we look for empty OPP tables with just a clock handle and
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1293  		 * scale only the clk. This makes dev_pm_opp_set_rate()
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1294  		 * equivalent to a clk_set_rate()
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1295  		 */
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1296  		if (!_get_opp_count(opp_table)) {
ff3c34983e1cca8 drivers/opp/core.c            Krzysztof Kozlowski 2022-04-05  1297  			if (opp_table->clks)
ff3c34983e1cca8 drivers/opp/core.c            Krzysztof Kozlowski 2022-04-05  1298  				ret = _generic_set_opp_clk_only(dev,
ff3c34983e1cca8 drivers/opp/core.c            Krzysztof Kozlowski 2022-04-05  1299  								opp_table->clks[0],
ff3c34983e1cca8 drivers/opp/core.c            Krzysztof Kozlowski 2022-04-05  1300  								target_freq);
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1301  			goto put_opp_table;
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1302  		}
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1303  
ff3c34983e1cca8 drivers/opp/core.c            Krzysztof Kozlowski 2022-04-05  1304  		if (opp_table->clks)
ff3c34983e1cca8 drivers/opp/core.c            Krzysztof Kozlowski 2022-04-05  1305  			freq = clk_round_rate(opp_table->clks[0], target_freq);
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1306  		if ((long)freq <= 0)
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1307  			freq = target_freq;
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1308  
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1309  		/*
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1310  		 * The clock driver may support finer resolution of the
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1311  		 * frequencies than the OPP table, don't update the frequency we
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1312  		 * pass to clk_set_rate() here.
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1313  		 */
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1314  		temp_freq = freq;
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1315  		opp = _find_freq_ceil(opp_table, &temp_freq);
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1316  		if (IS_ERR(opp)) {
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1317  			ret = PTR_ERR(opp);
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1318  			dev_err(dev, "%s: failed to find OPP for freq %lu (%d)\n",
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1319  				__func__, freq, ret);
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1320  			goto put_opp_table;
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1321  		}
ff3c34983e1cca8 drivers/opp/core.c            Krzysztof Kozlowski 2022-04-05  1322  		/*
ff3c34983e1cca8 drivers/opp/core.c            Krzysztof Kozlowski 2022-04-05  1323  		 * opp->rates are used for scaling clocks, so be sure accurate
ff3c34983e1cca8 drivers/opp/core.c            Krzysztof Kozlowski 2022-04-05  1324  		 * 'freq' is used, instead what was defined via e.g. Devicetree.
ff3c34983e1cca8 drivers/opp/core.c            Krzysztof Kozlowski 2022-04-05  1325  		 */
ff3c34983e1cca8 drivers/opp/core.c            Krzysztof Kozlowski 2022-04-05  1326  		opp->rates[0] = freq;
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1327  	}
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1328  
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1329  	ret = _set_opp(dev, opp_table, opp, freq);
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1330  
386ba854d9f3163 drivers/opp/core.c            Viresh Kumar        2021-01-21  1331  	if (target_freq)
8a31d9d94297b1e drivers/base/power/opp/core.c Viresh Kumar        2017-01-23  1332  		dev_pm_opp_put(opp);
052c6f19141dd13 drivers/base/power/opp/core.c Viresh Kumar        2017-01-23  1333  put_opp_table:
5b650b388844f26 drivers/base/power/opp/core.c Viresh Kumar        2017-01-23  1334  	dev_pm_opp_put_opp_table(opp_table);
052c6f19141dd13 drivers/base/power/opp/core.c Viresh Kumar        2017-01-23 @1335  	return ret;
6a0712f6f199e73 drivers/base/power/opp/core.c Viresh Kumar        2016-02-09  1336  }
6a0712f6f199e73 drivers/base/power/opp/core.c Viresh Kumar        2016-02-09  1337  EXPORT_SYMBOL_GPL(dev_pm_opp_set_rate);
6a0712f6f199e73 drivers/base/power/opp/core.c Viresh Kumar        2016-02-09  1338  

:::::: The code at line 1335 was first introduced by commit
:::::: 052c6f19141dd13f266cc465fde6f38ddc93d5fb PM / OPP: Move away from RCU locking

:::::: TO: Viresh Kumar <viresh.kumar@linaro.org>
:::::: CC: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

only message in thread, other threads:[~2022-05-10 15:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-10 15:15 [krzk-github:n/qcom-ufs-opp-v3 10/13] drivers/opp/core.c:1335:2: warning: Undefined or garbage value returned to caller [clang-analyzer-core.uninitialized.UndefReturn] 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.