Re: [PATCH 3/5] crypto: tegra: Add Tegra Security Engine driver

From: kernel test robot
Date: Thu Dec 14 2023 - 02:14:05 EST


Hi Akhil,

kernel test robot noticed the following build warnings:

[auto build test WARNING on herbert-cryptodev-2.6/master]
[also build test WARNING on drm/drm-next arm64/for-next/core robh/for-next linus/master v6.7-rc5 next-20231213]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Akhil-R/dt-bindings-crypto-Add-Tegra-SE-DT-binding-doc/20231213-202407
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
patch link: https://lore.kernel.org/r/20231213122030.11734-4-akhilrajeev%40nvidia.com
patch subject: [PATCH 3/5] crypto: tegra: Add Tegra Security Engine driver
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20231214/202312141448.599zJgqd-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231214/202312141448.599zJgqd-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/202312141448.599zJgqd-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/crypto/tegra/tegra-se-main.c:283:51: warning: variable 'i' is uninitialized when used here [-Wuninitialized]
283 | dev_err(se->dev, "failed to set %d clock rate", i);
| ^
include/linux/dev_printk.h:144:65: note: expanded from macro 'dev_err'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
drivers/crypto/tegra/tegra-se-main.c:273:7: note: initialize the variable 'i' to silence this warning
273 | int i, ret;
| ^
| = 0
1 warning generated.


vim +/i +283 drivers/crypto/tegra/tegra-se-main.c

270
271 static int tegra_se_clk_init(struct tegra_se *se)
272 {
273 int i, ret;
274
275 se->clk = devm_clk_get(se->dev, NULL);
276 if (IS_ERR(se->clk)) {
277 dev_err(se->dev, "failed to get clock\n");
278 return PTR_ERR(se->clk);
279 }
280
281 ret = clk_set_rate(se->clk, ULONG_MAX);
282 if (ret) {
> 283 dev_err(se->dev, "failed to set %d clock rate", i);
284 return ret;
285 }
286
287 ret = clk_prepare_enable(se->clk);
288 if (ret) {
289 dev_err(se->dev, "failed to enable clocks\n");
290 return ret;
291 }
292
293 return 0;
294 }
295

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