drivers/soc/fsl/qbman/qman.c:2421:19-26: opportunity for str_plural(err_cnt) (fwd)

From: Julia Lawall
Date: Tue Sep 10 2024 - 01:05:25 EST




---------- Forwarded message ----------
Date: Tue, 10 Sep 2024 11:39:04 +0800
From: kernel test robot <lkp@xxxxxxxxx>
To: oe-kbuild@xxxxxxxxxxxxxxx
Cc: lkp@xxxxxxxxx, Julia Lawall <julia.lawall@xxxxxxxx>
Subject: drivers/soc/fsl/qbman/qman.c:2421:19-26: opportunity for
str_plural(err_cnt)

BCC: lkp@xxxxxxxxx
CC: oe-kbuild-all@xxxxxxxxxxxxxxx
CC: linux-kernel@xxxxxxxxxxxxxxx
TO: Breno Leitao <leitao@xxxxxxxxxx>
CC: Jakub Kicinski <kuba@xxxxxxxxxx>
CC: Vladimir Oltean <vladimir.oltean@xxxxxxx>

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: bc83b4d1f08695e85e85d36f7b803da58010161d
commit: 782fe08e9861d00ce8aca370453dd9ceb9a23d50 soc: fsl: qbman: FSL_DPAA depends on COMPILE_TEST
date: 8 weeks ago
:::::: branch date: 11 hours ago
:::::: commit date: 8 weeks ago
config: sparc-randconfig-r062-20240910 (https://download.01.org/0day-ci/archive/20240910/202409101138.v3FBr5hk-lkp@xxxxxxxxx/config)
compiler: sparc64-linux-gcc (GCC) 14.1.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@xxxxxxxxx>
| Reported-by: Julia Lawall <julia.lawall@xxxxxxxx>
| Closes: https://lore.kernel.org/r/202409101138.v3FBr5hk-lkp@xxxxxxxxx/

cocci warnings: (new ones prefixed by >>)
>> drivers/soc/fsl/qbman/qman.c:2421:19-26: opportunity for str_plural(err_cnt)

vim +2421 drivers/soc/fsl/qbman/qman.c

c535e923bb97a4 Claudiu Manoil 2016-09-22 2408
c535e923bb97a4 Claudiu Manoil 2016-09-22 2409 void qman_init_cgr_all(void)
c535e923bb97a4 Claudiu Manoil 2016-09-22 2410 {
c535e923bb97a4 Claudiu Manoil 2016-09-22 2411 struct qman_cgr cgr;
c535e923bb97a4 Claudiu Manoil 2016-09-22 2412 int err_cnt = 0;
c535e923bb97a4 Claudiu Manoil 2016-09-22 2413
c535e923bb97a4 Claudiu Manoil 2016-09-22 2414 for (cgr.cgrid = 0; cgr.cgrid < CGR_NUM; cgr.cgrid++) {
c535e923bb97a4 Claudiu Manoil 2016-09-22 2415 if (qm_modify_cgr(&cgr, QMAN_CGR_FLAG_USE_INIT, NULL))
c535e923bb97a4 Claudiu Manoil 2016-09-22 2416 err_cnt++;
c535e923bb97a4 Claudiu Manoil 2016-09-22 2417 }
c535e923bb97a4 Claudiu Manoil 2016-09-22 2418
c535e923bb97a4 Claudiu Manoil 2016-09-22 2419 if (err_cnt)
c535e923bb97a4 Claudiu Manoil 2016-09-22 2420 pr_err("Warning: %d error%s while initialising CGR h/w\n",
c535e923bb97a4 Claudiu Manoil 2016-09-22 @2421 err_cnt, (err_cnt > 1) ? "s" : "");
c535e923bb97a4 Claudiu Manoil 2016-09-22 2422 }
c535e923bb97a4 Claudiu Manoil 2016-09-22 2423

:::::: The code at line 2421 was first introduced by commit
:::::: c535e923bb97a4b361e89a6383693482057f8b0c soc/fsl: Introduce DPAA 1.x QMan device driver

:::::: TO: Claudiu Manoil <claudiu.manoil@xxxxxxx>
:::::: CC: Scott Wood <oss@xxxxxxxxxxxx>

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