On 22-Jul-26 12:57 PM, Wang, Yang(Kevin) wrote:
AMD General

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
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

Best Regards,
Kevin

-----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 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 ))

Fixes: 7b88453a476c ("drm/amd/pm: Change get_enabled_mask signature")
Reported-by: kernel test robot <[email protected]>
Closes: 
https://lore.kernel.org/oe-kbuild-all/[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(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
index 2bd3ea17e789..764f943df5a8 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
@@ -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


Reply via email to