* [PATCH] drm/amd: remove unnecessary conversion to bool
@ 2020-06-12 12:28 Bernard Zhao
2020-06-12 15:24 ` Alex Deucher
0 siblings, 1 reply; 2+ messages in thread
From: Bernard Zhao @ 2020-06-12 12:28 UTC (permalink / raw)
To: Evan Quan, Alex Deucher, Christian König, David Airlie,
Daniel Vetter, amd-gfx, dri-devel, linux-kernel
Cc: opensource.kernel, Bernard Zhao
In function is_support_sw_smu, remove unnecessary conversion
to bool return, this change is to make the code a bit readable.
Signed-off-by: Bernard Zhao <bernard@vivo.com>
---
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
index 8c684a6e0156..3e1cfb010378 100644
--- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
@@ -568,7 +568,7 @@ int smu_update_table(struct smu_context *smu, enum smu_table_id table_index, int
bool is_support_sw_smu(struct amdgpu_device *adev)
{
if (adev->asic_type == CHIP_VEGA20)
- return (amdgpu_dpm == 2) ? true : false;
+ return (amdgpu_dpm == 2);
else if (adev->asic_type >= CHIP_ARCTURUS) {
if (amdgpu_sriov_is_pp_one_vf(adev) || !amdgpu_sriov_vf(adev))
return true;
--
2.17.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amd: remove unnecessary conversion to bool
2020-06-12 12:28 [PATCH] drm/amd: remove unnecessary conversion to bool Bernard Zhao
@ 2020-06-12 15:24 ` Alex Deucher
0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2020-06-12 15:24 UTC (permalink / raw)
To: Bernard Zhao
Cc: opensource.kernel, David Airlie, LKML, amd-gfx list,
Maling list - DRI developers, Alex Deucher, Evan Quan,
Christian König
On Fri, Jun 12, 2020 at 9:22 AM Bernard Zhao <bernard@vivo.com> wrote:
>
> In function is_support_sw_smu, remove unnecessary conversion
> to bool return, this change is to make the code a bit readable.
>
> Signed-off-by: Bernard Zhao <bernard@vivo.com>
Vega20 support was removed from this code path so the patch is no
longer relevant.
Thanks,
Alex
> ---
> drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> index 8c684a6e0156..3e1cfb010378 100644
> --- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> +++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> @@ -568,7 +568,7 @@ int smu_update_table(struct smu_context *smu, enum smu_table_id table_index, int
> bool is_support_sw_smu(struct amdgpu_device *adev)
> {
> if (adev->asic_type == CHIP_VEGA20)
> - return (amdgpu_dpm == 2) ? true : false;
> + return (amdgpu_dpm == 2);
> else if (adev->asic_type >= CHIP_ARCTURUS) {
> if (amdgpu_sriov_is_pp_one_vf(adev) || !amdgpu_sriov_vf(adev))
> return true;
> --
> 2.17.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-13 10:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-12 12:28 [PATCH] drm/amd: remove unnecessary conversion to bool Bernard Zhao
2020-06-12 15:24 ` Alex Deucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).