All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] debug:kdb: fix unsigned int win compared to less than zero
@ 2021-08-20  2:24 jing yangyang
  2021-08-20 16:46 ` Doug Anderson
  2021-08-21  5:40 ` Christophe JAILLET
  0 siblings, 2 replies; 3+ messages in thread
From: jing yangyang @ 2021-08-20  2:24 UTC (permalink / raw)
  To: Jason Wessel, Daniel Thompson, Douglas Anderson, Sumit Garg,
	Will Deacon, Stephen Zhang, Peter Zijlstra,
	Gustavo A . R . Silva, kgdb-bugreport, linux-kernel
  Cc: jing yangyang, Zeal Robot

Fix coccicheck warning:
./kernel/debug/kdb/kdb_support.c:575:3-10:
WARNING:Unsigned expression compared with zero  p_state < 0

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: jing yangyang <jing.yangyang@zte.com.cn>
---
 kernel/debug/kdb/kdb_support.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/debug/kdb/kdb_support.c b/kernel/debug/kdb/kdb_support.c
index c605b17..fb30801 100644
--- a/kernel/debug/kdb/kdb_support.c
+++ b/kernel/debug/kdb/kdb_support.c
@@ -560,7 +560,7 @@ unsigned long kdb_task_state_string(const char *s)
  */
 char kdb_task_state_char (const struct task_struct *p)
 {
-	unsigned int p_state;
+	int p_state;
 	unsigned long tmp;
 	char state;
 	int cpu;
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-21  5:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-20  2:24 [PATCH linux-next] debug:kdb: fix unsigned int win compared to less than zero jing yangyang
2021-08-20 16:46 ` Doug Anderson
2021-08-21  5:40 ` Christophe JAILLET

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.