drm/amd/pm: Fix warning about helper function use
Subsystems (3)
PATCH 1/1 drm/amd/pm: Fix warning about helper function use
Use str_enabled_disabled to fix below warning
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c:920:3-56: opportunity for str_enabled_disabled(smu_feature_bits_is_set ( & feature_mask , feature_index ))
--- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +2 -3
@@ -965,9 +965,8 @@ size_t smu_cmn_get_pp_feature_mask(struct smu_context *smu, buf, size,"%02d. %-20s (%2d) : %s\n" , count++,smu_get_feature_name (smu, sort_feature[feature_index]), feature_index, -smu_feature_bits_is_set (&feature_mask, feature_index) ? -"enabled" : - "disabled"); +str_enabled_disabled (smu_feature_bits_is_set ( + &feature_mask, feature_index))); }return size;
Signature · 1 line
2.49.0
AMD General
Quoted 1 line
Fixes 7b88453a476c ("drm/amd/pm: Change get_enabled_mask signature")
I suggest removing this line and refine the patch title.
The tag "Fixes" is used to indicate that a patch should be cherry-picked to the stable kernel branch as a bugfix. In this case, this is only a suggestion rather than a bug. No related issue was introduced in the original patch.
Ref:
static inline const char *str_enabled_disabled(bool v)
{
return v ? "enabled" : "disabled";
}With that fixed, this patch is
Best Regards,
Kevin
Quoted 42 lines
-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Wednesday, July 22, 2026 14:56
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Deucher, Alexander <[email protected]>; Kamal, Asad <[email protected]>; Wang, Yang(Kevin) <[email protected]>; kernel test robot <[email protected]>
Subject: [PATCH] drm/amd/pm: Fix warning about helper function useUse
str_enabled_disabledto fix below warning drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c:920:3-56: opportunity forstr_enabled_disabled(smu_feature_bits_is_set ( & feature_mask , feature_index ))Fixes 7b88453a476c ("drm/amd/pm: Change get_enabled_mask signature")Reported-by kernel test robot <[email protected]>Signed-off-by Lijo Lazar <[email protected]>--- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +2
-3@@ -965,9 +965,8 @@ size_t smu_cmn_get_pp_feature_mask(struct smu_context *smu, buf, size,"%02d. %-20s (%2d) : %s\n" , count++,smu_get_feature_name (smu, sort_feature[feature_index]), feature_index, -smu_feature_bits_is_set (&feature_mask, feature_index) ? -"enabled" : - "disabled"); +str_enabled_disabled (smu_feature_bits_is_set ( + &feature_mask, feature_index))); }return size;--
2.49.0
Quoted 8 lines · Yang(Kevin)
AMD General
Quoted 1 line
Fixes 7b88453a476c ("drm/amd/pm: Change get_enabled_mask signature")I suggest removing this line and refine the patch title.
The tag "Fixes" is used to indicate that a patch should be cherry-picked to the stable kernel branch as a bugfix. In this case, this is only a suggestion rather than a bug. No related issue was introduced in the original patch.
Quoted 9 lines
Ref:
static inline const char *str_enabled_disabled(bool v){ return v ? "enabled" : "disabled"; }With that fixed, this patch is
Reviewed-by Yang Wang <[email protected]>
Yeah, the tags are copied from kernel test robot's mail. It's only a cocci script warning fix.
Thanks,
Lijo
Quoted 46 lines
Best Regards,
KevinQuoted 42 lines
-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Wednesday, July 22, 2026 14:56
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Deucher, Alexander <[email protected]>; Kamal, Asad <[email protected]>; Wang, Yang(Kevin) <[email protected]>; kernel test robot <[email protected]>
Subject: [PATCH] drm/amd/pm: Fix warning about helper function useUse
str_enabled_disabledto fix below warning drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c:920:3-56: opportunity forstr_enabled_disabled(smu_feature_bits_is_set ( & feature_mask , feature_index ))Fixes 7b88453a476c ("drm/amd/pm: Change get_enabled_mask signature")Reported-by kernel test robot <[email protected]>Signed-off-by Lijo Lazar <[email protected]>--- drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +2
-3@@ -965,9 +965,8 @@ size_t smu_cmn_get_pp_feature_mask(struct smu_context *smu, buf, size,"%02d. %-20s (%2d) : %s\n" , count++,smu_get_feature_name (smu, sort_feature[feature_index]), feature_index, -smu_feature_bits_is_set (&feature_mask, feature_index) ? -"enabled" : - "disabled"); +str_enabled_disabled (smu_feature_bits_is_set ( + &feature_mask, feature_index))); }return size;--
2.49.0