From: kernel test robot <lkp@intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Daniel Bristot de Oliveira <bristot@redhat.com>
Subject: arch/powerpc/xmon/xmon.c:3174 show_task() warn: unsigned 'p_state' is never less than zero.
Date: Fri, 13 Aug 2021 01:37:55 +0800 [thread overview]
Message-ID: <202108130149.7jg5DphB-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1850 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1746f4db513563bb22e0ba0c419d0c90912dfae1
commit: 2f064a59a11ff9bc22e52e9678bc601404c7cb34 sched: Change task_struct::state
date: 8 weeks ago
config: powerpc64-randconfig-m031-20210812 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 10.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
New smatch warnings:
arch/powerpc/xmon/xmon.c:3174 show_task() warn: unsigned 'p_state' is never less than zero.
Old smatch warnings:
arch/powerpc/include/asm/mmu.h:233 early_mmu_has_feature() warn: bitwise AND condition is false here
arch/powerpc/xmon/xmon.c:2798 dump() warn: '"d?
vim +/p_state +3174 arch/powerpc/xmon/xmon.c
3162
3163 static void show_task(struct task_struct *tsk)
3164 {
3165 unsigned int p_state = READ_ONCE(tsk->__state);
3166 char state;
3167
3168 /*
3169 * Cloned from kdb_task_state_char(), which is not entirely
3170 * appropriate for calling from xmon. This could be moved
3171 * to a common, generic, routine used by both.
3172 */
3173 state = (p_state == 0) ? 'R' :
> 3174 (p_state < 0) ? 'U' :
3175 (p_state & TASK_UNINTERRUPTIBLE) ? 'D' :
3176 (p_state & TASK_STOPPED) ? 'T' :
3177 (p_state & TASK_TRACED) ? 'C' :
3178 (tsk->exit_state & EXIT_ZOMBIE) ? 'Z' :
3179 (tsk->exit_state & EXIT_DEAD) ? 'E' :
3180 (p_state & TASK_INTERRUPTIBLE) ? 'S' : '?';
3181
3182 printf("%16px %16lx %16px %6d %6d %c %2d %s\n", tsk,
3183 tsk->thread.ksp, tsk->thread.regs,
3184 tsk->pid, rcu_dereference(tsk->parent)->pid,
3185 state, task_cpu(tsk),
3186 tsk->comm);
3187 }
3188
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37061 bytes --]
next reply other threads:[~2021-08-12 17:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-12 17:37 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-08-27 5:03 arch/powerpc/xmon/xmon.c:3174 show_task() warn: unsigned 'p_state' is never less than zero kernel test robot
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=202108130149.7jg5DphB-lkp@intel.com \
--to=lkp@intel.com \
--cc=bristot@redhat.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox