2023-11-21 04:37:12

by RutingZhang

[permalink] [raw]
Subject: [PATCH] gpu: display: remove unnecessary braces to fix coding style

checkpatch complains that:

WARNING: braces {} are not necessary for single statement blocks
+ if (pool->base.irqs != NULL) {
+ dal_irq_service_destroy(&pool->base.irqs);
+ }

Fixed it by removing unnecessary braces to fix the coding style issue.

Signed-off-by: RutingZhang <[email protected]>
Reviewed-by: Dongliang Mu <[email protected]>
---
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
index 447de8492594..6835dbb733a2 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
@@ -713,9 +713,8 @@ static void dcn21_resource_destruct(struct dcn21_resource_pool *pool)
pool->base.hubps[i] = NULL;
}

- if (pool->base.irqs != NULL) {
+ if (pool->base.irqs != NULL)
dal_irq_service_destroy(&pool->base.irqs);
- }
}

for (i = 0; i < pool->base.res_cap->num_ddc; i++) {
--
2.25.1


2023-11-21 09:17:32

by Christian König

[permalink] [raw]
Subject: Re: [PATCH] gpu: display: remove unnecessary braces to fix coding style

Am 21.11.23 um 05:36 schrieb RutingZhang:
> checkpatch complains that:
>
> WARNING: braces {} are not necessary for single statement blocks
> + if (pool->base.irqs != NULL) {
> + dal_irq_service_destroy(&pool->base.irqs);
> + }
>
> Fixed it by removing unnecessary braces to fix the coding style issue.
>
> Signed-off-by: RutingZhang <[email protected]>
> Reviewed-by: Dongliang Mu <[email protected]>

Subject line prefix should be "drm/amdgpu".

Apart from this nit it looks good to me, but might be already fixed
internally.

Regards,
Christian.

> ---
> drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
> index 447de8492594..6835dbb733a2 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
> @@ -713,9 +713,8 @@ static void dcn21_resource_destruct(struct dcn21_resource_pool *pool)
> pool->base.hubps[i] = NULL;
> }
>
> - if (pool->base.irqs != NULL) {
> + if (pool->base.irqs != NULL)
> dal_irq_service_destroy(&pool->base.irqs);
> - }
> }
>
> for (i = 0; i < pool->base.res_cap->num_ddc; i++) {

2023-11-21 18:53:25

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH] gpu: display: remove unnecessary braces to fix coding style

On Tue, Nov 21, 2023 at 4:27 AM Christian König
<[email protected]> wrote:
>
> Am 21.11.23 um 05:36 schrieb RutingZhang:
> > checkpatch complains that:
> >
> > WARNING: braces {} are not necessary for single statement blocks
> > + if (pool->base.irqs != NULL) {
> > + dal_irq_service_destroy(&pool->base.irqs);
> > + }
> >
> > Fixed it by removing unnecessary braces to fix the coding style issue.
> >
> > Signed-off-by: RutingZhang <[email protected]>
> > Reviewed-by: Dongliang Mu <[email protected]>
>
> Subject line prefix should be "drm/amdgpu".
>
> Apart from this nit it looks good to me, but might be already fixed
> internally.

Applied. Thanks!

Alex

>
> Regards,
> Christian.
>
> > ---
> > drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
> > index 447de8492594..6835dbb733a2 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
> > @@ -713,9 +713,8 @@ static void dcn21_resource_destruct(struct dcn21_resource_pool *pool)
> > pool->base.hubps[i] = NULL;
> > }
> >
> > - if (pool->base.irqs != NULL) {
> > + if (pool->base.irqs != NULL)
> > dal_irq_service_destroy(&pool->base.irqs);
> > - }
> > }
> >
> > for (i = 0; i < pool->base.res_cap->num_ddc; i++) {
>