All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/pm: Remove unnecessary conversion to bool
@ 2021-02-07  8:49 ` Jiapeng Chong
  0 siblings, 0 replies; 5+ messages in thread
From: Jiapeng Chong @ 2021-02-07  8:49 UTC (permalink / raw)
  To: alexander.deucher
  Cc: christian.koenig, airlied, daniel, amd-gfx, dri-devel,
	linux-kernel, Jiapeng Chong

Fix the following coccicheck warning:

./drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c:907:47-52:
WARNING: conversion to bool not needed here.

Reported-by: Abaci Robot<abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
index d68d3df..b364862 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
@@ -904,7 +904,7 @@ static bool sienna_cichlid_is_support_fine_grained_dpm(struct smu_context *smu,
 	dpm_desc = &pptable->DpmDescriptor[clk_index];
 
 	/* 0 - Fine grained DPM, 1 - Discrete DPM */
-	return dpm_desc->SnapToDiscrete == 0 ? true : false;
+	return dpm_desc->SnapToDiscrete != 0;
 }
 
 static int sienna_cichlid_print_clk_levels(struct smu_context *smu,
-- 
1.8.3.1


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

* [PATCH] drm/amd/pm: Remove unnecessary conversion to bool
@ 2021-02-07  8:49 ` Jiapeng Chong
  0 siblings, 0 replies; 5+ messages in thread
From: Jiapeng Chong @ 2021-02-07  8:49 UTC (permalink / raw)
  To: alexander.deucher
  Cc: Jiapeng Chong, airlied, linux-kernel, dri-devel, amd-gfx,
	christian.koenig

Fix the following coccicheck warning:

./drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c:907:47-52:
WARNING: conversion to bool not needed here.

Reported-by: Abaci Robot<abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
index d68d3df..b364862 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
@@ -904,7 +904,7 @@ static bool sienna_cichlid_is_support_fine_grained_dpm(struct smu_context *smu,
 	dpm_desc = &pptable->DpmDescriptor[clk_index];
 
 	/* 0 - Fine grained DPM, 1 - Discrete DPM */
-	return dpm_desc->SnapToDiscrete == 0 ? true : false;
+	return dpm_desc->SnapToDiscrete != 0;
 }
 
 static int sienna_cichlid_print_clk_levels(struct smu_context *smu,
-- 
1.8.3.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH] drm/amd/pm: Remove unnecessary conversion to bool
@ 2021-02-07  8:49 ` Jiapeng Chong
  0 siblings, 0 replies; 5+ messages in thread
From: Jiapeng Chong @ 2021-02-07  8:49 UTC (permalink / raw)
  To: alexander.deucher
  Cc: Jiapeng Chong, airlied, linux-kernel, dri-devel, amd-gfx, daniel,
	christian.koenig

Fix the following coccicheck warning:

./drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c:907:47-52:
WARNING: conversion to bool not needed here.

Reported-by: Abaci Robot<abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
index d68d3df..b364862 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
@@ -904,7 +904,7 @@ static bool sienna_cichlid_is_support_fine_grained_dpm(struct smu_context *smu,
 	dpm_desc = &pptable->DpmDescriptor[clk_index];
 
 	/* 0 - Fine grained DPM, 1 - Discrete DPM */
-	return dpm_desc->SnapToDiscrete == 0 ? true : false;
+	return dpm_desc->SnapToDiscrete != 0;
 }
 
 static int sienna_cichlid_print_clk_levels(struct smu_context *smu,
-- 
1.8.3.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH] drm/amd/pm: Remove unnecessary conversion to bool
  2021-02-07  8:49 ` Jiapeng Chong
@ 2021-02-07  8:55   ` Wang, Kevin(Yang)
  -1 siblings, 0 replies; 5+ messages in thread
From: Wang, Kevin(Yang) @ 2021-02-07  8:55 UTC (permalink / raw)
  To: Jiapeng Chong, Deucher, Alexander
  Cc: airlied, linux-kernel, dri-devel, amd-gfx, Koenig, Christian


[-- Attachment #1.1: Type: text/plain, Size: 1896 bytes --]

[AMD Official Use Only - Internal Distribution Only]

if possible, please correct the same issue in navi10_ppt.c

Reviewed-by: Kevin Wang <kevin1.wang@amd.com>

Best Regards,
Kevin
________________________________
From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Sent: Sunday, February 7, 2021 4:49 PM
To: Deucher, Alexander <Alexander.Deucher@amd.com>
Cc: Koenig, Christian <Christian.Koenig@amd.com>; airlied@linux.ie <airlied@linux.ie>; daniel@ffwll.ch <daniel@ffwll.ch>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; dri-devel@lists.freedesktop.org <dri-devel@lists.freedesktop.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Subject: [PATCH] drm/amd/pm: Remove unnecessary conversion to bool

Fix the following coccicheck warning:

./drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c:907:47-52:
WARNING: conversion to bool not needed here.

Reported-by: Abaci Robot<abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
index d68d3df..b364862 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
@@ -904,7 +904,7 @@ static bool sienna_cichlid_is_support_fine_grained_dpm(struct smu_context *smu,
         dpm_desc = &pptable->DpmDescriptor[clk_index];

         /* 0 - Fine grained DPM, 1 - Discrete DPM */
-       return dpm_desc->SnapToDiscrete == 0 ? true : false;
+       return dpm_desc->SnapToDiscrete != 0;
 }

 static int sienna_cichlid_print_clk_levels(struct smu_context *smu,
--
1.8.3.1


[-- Attachment #1.2: Type: text/html, Size: 4167 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/amd/pm: Remove unnecessary conversion to bool
@ 2021-02-07  8:55   ` Wang, Kevin(Yang)
  0 siblings, 0 replies; 5+ messages in thread
From: Wang, Kevin(Yang) @ 2021-02-07  8:55 UTC (permalink / raw)
  To: Jiapeng Chong, Deucher, Alexander
  Cc: airlied, linux-kernel, dri-devel, amd-gfx, daniel, Koenig, Christian


[-- Attachment #1.1: Type: text/plain, Size: 1896 bytes --]

[AMD Official Use Only - Internal Distribution Only]

if possible, please correct the same issue in navi10_ppt.c

Reviewed-by: Kevin Wang <kevin1.wang@amd.com>

Best Regards,
Kevin
________________________________
From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Sent: Sunday, February 7, 2021 4:49 PM
To: Deucher, Alexander <Alexander.Deucher@amd.com>
Cc: Koenig, Christian <Christian.Koenig@amd.com>; airlied@linux.ie <airlied@linux.ie>; daniel@ffwll.ch <daniel@ffwll.ch>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; dri-devel@lists.freedesktop.org <dri-devel@lists.freedesktop.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Subject: [PATCH] drm/amd/pm: Remove unnecessary conversion to bool

Fix the following coccicheck warning:

./drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c:907:47-52:
WARNING: conversion to bool not needed here.

Reported-by: Abaci Robot<abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
index d68d3df..b364862 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
@@ -904,7 +904,7 @@ static bool sienna_cichlid_is_support_fine_grained_dpm(struct smu_context *smu,
         dpm_desc = &pptable->DpmDescriptor[clk_index];

         /* 0 - Fine grained DPM, 1 - Discrete DPM */
-       return dpm_desc->SnapToDiscrete == 0 ? true : false;
+       return dpm_desc->SnapToDiscrete != 0;
 }

 static int sienna_cichlid_print_clk_levels(struct smu_context *smu,
--
1.8.3.1


[-- Attachment #1.2: Type: text/html, Size: 4167 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

end of thread, other threads:[~2021-02-07 10:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-07  8:49 [PATCH] drm/amd/pm: Remove unnecessary conversion to bool Jiapeng Chong
2021-02-07  8:49 ` Jiapeng Chong
2021-02-07  8:49 ` Jiapeng Chong
2021-02-07  8:55 ` Wang, Kevin(Yang)
2021-02-07  8:55   ` Wang, Kevin(Yang)

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.