All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
Subject: arch/s390/kernel/perf_pai.c:1320:12-13: WARNING opportunity for min()
Date: Sun, 13 Sep 2026 22:48:42 +0200	[thread overview]
Message-ID: <202609132234.kZqjNaow-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Thomas Richter <tmricht@linux.ibm.com>
CC: Vasily Gorbik <gor@linux.ibm.com>
CC: Jan Polensky <japo@linux.ibm.com>
CC: Heiko Carstens <hca@linux.ibm.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d681d7ef617ef83d6a4de36e5cb4418ef602e122
commit: 9ecc4d033879f7761f2df07e20cd2fbec00fd90b s390/pai: Support CPU hotplug for PMU PAI
date:   5 days ago
:::::: branch date: 3 hours ago
:::::: commit date: 5 days ago
config: s390-randconfig-r051-20260913 (https://download.01.org/0day-ci/archive/20260913/202609132234.kZqjNaow-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)

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
| Fixes: 9ecc4d033879 ("s390/pai: Support CPU hotplug for PMU PAI")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202609132234.kZqjNaow-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> arch/s390/kernel/perf_pai.c:1320:12-13: WARNING opportunity for min()

vim +1320 arch/s390/kernel/perf_pai.c

9ecc4d033879f77 arch/s390/kernel/perf_pai.c        Thomas Richter 2026-09-01  1304  
35a27bad075d594 arch/s390/kernel/perf_pai_crypto.c Thomas Richter 2025-11-05  1305  static int __init pai_init(void)
a3f8423622ef34c arch/s390/kernel/perf_pai_crypto.c Thomas Richter 2025-11-05  1306  {
9ecc4d033879f77 arch/s390/kernel/perf_pai.c        Thomas Richter 2026-09-01  1307  	int state, rc;
9ecc4d033879f77 arch/s390/kernel/perf_pai.c        Thomas Richter 2026-09-01  1308  
39d62336f5c126a arch/s390/kernel/perf_pai_crypto.c Thomas Richter 2022-05-04  1309  	/* Setup s390dbf facility */
8cff0ac21658fed arch/s390/kernel/perf_pai.c        Heiko Carstens 2026-08-25  1310  	paidbg = debug_register("pai", 1, 1, 128);
abc524caa1382a5 arch/s390/kernel/perf_pai_crypto.c Thomas Richter 2025-11-05  1311  	if (!paidbg) {
c3d17464f0262c9 arch/s390/kernel/perf_pai.c        Heiko Carstens 2025-11-20  1312  		pr_err("Registration of s390dbf pai failed\n");
39d62336f5c126a arch/s390/kernel/perf_pai_crypto.c Thomas Richter 2022-05-04  1313  		return -ENOMEM;
39d62336f5c126a arch/s390/kernel/perf_pai_crypto.c Thomas Richter 2022-05-04  1314  	}
abc524caa1382a5 arch/s390/kernel/perf_pai_crypto.c Thomas Richter 2025-11-05  1315  	debug_register_view(paidbg, &debug_sprintf_view);
39d62336f5c126a arch/s390/kernel/perf_pai_crypto.c Thomas Richter 2022-05-04  1316  
9ecc4d033879f77 arch/s390/kernel/perf_pai.c        Thomas Richter 2026-09-01  1317  	/* CPUHP_BP_PREPARE_DYN --> before CPU is brought online */
9ecc4d033879f77 arch/s390/kernel/perf_pai.c        Thomas Richter 2026-09-01  1318  	state = cpuhp_setup_state(CPUHP_BP_PREPARE_DYN, "perf/pai:prepare",
9ecc4d033879f77 arch/s390/kernel/perf_pai.c        Thomas Richter 2026-09-01  1319  				  pai_online_cpu, pai_offline_cpu);
9ecc4d033879f77 arch/s390/kernel/perf_pai.c        Thomas Richter 2026-09-01 @1320  	rc = state < 0 ? state : 0;
9ecc4d033879f77 arch/s390/kernel/perf_pai.c        Thomas Richter 2026-09-01  1321  	if (rc < 0)
9ecc4d033879f77 arch/s390/kernel/perf_pai.c        Thomas Richter 2026-09-01  1322  		goto out_debug;
9ecc4d033879f77 arch/s390/kernel/perf_pai.c        Thomas Richter 2026-09-01  1323  
9ecc4d033879f77 arch/s390/kernel/perf_pai.c        Thomas Richter 2026-09-01  1324  	rc = -ENODEV;
9ecc4d033879f77 arch/s390/kernel/perf_pai.c        Thomas Richter 2026-09-01  1325  	if (!paipmu_setup())
9ecc4d033879f77 arch/s390/kernel/perf_pai.c        Thomas Richter 2026-09-01  1326  		goto out_cpuhp;
9ecc4d033879f77 arch/s390/kernel/perf_pai.c        Thomas Richter 2026-09-01  1327  	return 0;
9ecc4d033879f77 arch/s390/kernel/perf_pai.c        Thomas Richter 2026-09-01  1328  
9ecc4d033879f77 arch/s390/kernel/perf_pai.c        Thomas Richter 2026-09-01  1329  out_cpuhp:
9ecc4d033879f77 arch/s390/kernel/perf_pai.c        Thomas Richter 2026-09-01  1330  	cpuhp_remove_state(state);
9ecc4d033879f77 arch/s390/kernel/perf_pai.c        Thomas Richter 2026-09-01  1331  out_debug:
abc524caa1382a5 arch/s390/kernel/perf_pai_crypto.c Thomas Richter 2025-11-05  1332  	debug_unregister_view(paidbg, &debug_sprintf_view);
abc524caa1382a5 arch/s390/kernel/perf_pai_crypto.c Thomas Richter 2025-11-05  1333  	debug_unregister(paidbg);
9ecc4d033879f77 arch/s390/kernel/perf_pai.c        Thomas Richter 2026-09-01  1334  	return rc;
39d62336f5c126a arch/s390/kernel/perf_pai_crypto.c Thomas Richter 2022-05-04  1335  }
39d62336f5c126a arch/s390/kernel/perf_pai_crypto.c Thomas Richter 2022-05-04  1336  

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

                 reply	other threads:[~2026-09-13 20:48 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=202609132234.kZqjNaow-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=julia.lawall@inria.fr \
    --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.