From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
Subject: [lindholm-alpha:for-linus 57/57] arch/alpha/kernel/err_tsunami.c:653:22-23: WARNING opportunity for min()
Date: Tue, 20 Oct 2026 19:23:35 +0200 [thread overview]
Message-ID: <202610201902.6BG70hxk-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Magnus Lindholm <linmag7@gmail.com>
CC: Matt Turner <mattst88@gmail.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/lindholm/alpha.git for-linus
head: 71cf9644bcb35e686c3e12a703325335a0925946
commit: 71cf9644bcb35e686c3e12a703325335a0925946 [57/57] alpha: add bounded Clipper console-log scanning
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: alpha-randconfig-r2105-20261020 (https://download.01.org/0day-ci/archive/20261020/202610201902.6BG70hxk-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 12.5.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@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202610201902.6BG70hxk-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> arch/alpha/kernel/err_tsunami.c:653:22-23: WARNING opportunity for min()
vim +653 arch/alpha/kernel/err_tsunami.c
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 647
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 648 static void __init
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 649 tsunami_console_data_log(int cpu, struct percpu_struct *pcpu)
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 650 {
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 651 unsigned char *data = (void *)(IDENT_ADDR | pcpu->console_data_log_pa);
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 652 size_t length = pcpu->console_data_log_length;
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 @653 size_t dump = length < 1024 ? length : 1024;
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 654
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 655 printk("%sConsole data log for CPU %d (%zu bytes):\n",
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 656 err_print_prefix, cpu, length);
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 657 if (!(pcpu->console_data_log_pa & 7) &&
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 658 length <= ~0UL - (unsigned long)data &&
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 659 tsunami_console_log(data, length)) {
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 660 /* Acknowledge only after reaching a valid termination packet. */
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 661 pcpu->console_data_log_pa = 0;
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 662 return;
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 663 }
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 664 printk("%s Incomplete console log; retaining firmware pointer\n",
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 665 err_print_prefix);
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 666 /* Byte reads preserve partial headers without rounding beyond length. */
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 667 if (dump > ~0UL - (unsigned long)data)
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 668 return;
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 669 print_hex_dump(err_print_prefix, " ", DUMP_PREFIX_OFFSET, 16, 1,
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 670 data, dump, false);
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 671 if (dump < length)
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 672 printk("%s Raw console log truncated to %zu bytes\n",
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 673 err_print_prefix, dump);
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 674 }
71cf9644bcb35e6 Magnus Lindholm 2026-10-14 675
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-10-20 17:24 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=202610201902.6BG70hxk-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.