projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
269435a
)
drm/amd/pm: fix enum type compared against 0
author
Jesse Zhang
<jesse.zhang@amd.com>
Thu, 9 May 2024 03:20:57 +0000
(11:20 +0800)
committer
Alex Deucher
<alexander.deucher@amd.com>
Mon, 13 May 2024 20:12:02 +0000
(16:12 -0400)
This less-than-zero comparison of an unsigned value is never true. type < 0U
Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
index
6d1c3af
..
ac17e44
100644
(file)
--- a/
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
+++ b/
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
@@
-56,7
+56,7
@@
static const char * const __smu_message_names[] = {
static const char *smu_get_message_name(struct smu_context *smu,
enum smu_message_type type)
{
- if (type
< 0 || type
>= SMU_MSG_MAX_COUNT)
+ if (type >= SMU_MSG_MAX_COUNT)
return "unknown smu message";
return __smu_message_names[type];