Skip to contentSkip to conversation

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

DISCUSSION Julia Lawall 1 participant 1 message Sep 10, 2024

lore
Share & tools
lore
#0 lore raw

---------- Forwarded message ----------
Date: Tue, 10 Sep 2024 11:39:04 +0800
From: kernel test robot <[email protected]>
To: [email protected]
Cc: [email protected], Julia Lawall <[email protected]>
Subject: drivers/soc/fsl/qbman/qman.c:2421:19-26: opportunity for
str_plural(err_cnt)

BCC: [email protected]
CC: [email protected]
CC: [email protected]
TO: Breno Leitao <[email protected]>
CC: Jakub Kicinski <[email protected]>
CC: Vladimir Oltean <[email protected]>

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/[email protected]/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 <[email protected]>
| Reported-by: Julia Lawall <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

cocci warnings: (new ones prefixed by >>)

Quoted 1 line
Quoted 1 line

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 <[email protected]> :::::: CC: Scott Wood <[email protected]>

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