linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: Remove duplicate/repeating expression
@ 2023-02-10 10:11 Deepak R Varma
  2023-02-10 15:22 ` Harry Wentland
  0 siblings, 1 reply; 4+ messages in thread
From: Deepak R Varma @ 2023-02-10 10:11 UTC (permalink / raw)
  To: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
	Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
	amd-gfx, dri-devel, linux-kernel
  Cc: Saurabh Singh Sengar, Praveen Kumar, Deepak R Varma

Remove duplicate or repeating expressions in the if condition
evaluation. Issue identified using doubletest.cocci Coccinelle semantic
patch.

Signed-off-by: Deepak R Varma <drv@mailo.com>
---
 .../gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c b/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c
index 61ee9ba063a7..6576b897a512 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c
@@ -51,7 +51,7 @@ static bool CalculateBytePerPixelAnd256BBlockSizes(
 		*BytePerPixelDETC = 0;
 		*BytePerPixelY = 4;
 		*BytePerPixelC = 0;
-	} else if (SourcePixelFormat == dm_444_16 || SourcePixelFormat == dm_444_16) {
+	} else if (SourcePixelFormat == dm_444_16) {
 		*BytePerPixelDETY = 2;
 		*BytePerPixelDETC = 0;
 		*BytePerPixelY = 2;
-- 
2.34.1




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

* Re: [PATCH] drm/amd/display: Remove duplicate/repeating expression
  2023-02-10 10:11 [PATCH] drm/amd/display: Remove duplicate/repeating expression Deepak R Varma
@ 2023-02-10 15:22 ` Harry Wentland
  2023-02-10 18:16   ` Deepak R Varma
  2023-02-15  4:23   ` Alex Deucher
  0 siblings, 2 replies; 4+ messages in thread
From: Harry Wentland @ 2023-02-10 15:22 UTC (permalink / raw)
  To: Deepak R Varma, Leo Li, Rodrigo Siqueira, Alex Deucher,
	Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
	amd-gfx, dri-devel, linux-kernel
  Cc: Saurabh Singh Sengar, Praveen Kumar

On 2/10/23 05:11, Deepak R Varma wrote:
> Remove duplicate or repeating expressions in the if condition
> evaluation. Issue identified using doubletest.cocci Coccinelle semantic
> patch.
> 
> Signed-off-by: Deepak R Varma <drv@mailo.com>

Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> ---
>  .../gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c b/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c
> index 61ee9ba063a7..6576b897a512 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c
> @@ -51,7 +51,7 @@ static bool CalculateBytePerPixelAnd256BBlockSizes(
>  		*BytePerPixelDETC = 0;
>  		*BytePerPixelY = 4;
>  		*BytePerPixelC = 0;
> -	} else if (SourcePixelFormat == dm_444_16 || SourcePixelFormat == dm_444_16) {
> +	} else if (SourcePixelFormat == dm_444_16) {
>  		*BytePerPixelDETY = 2;
>  		*BytePerPixelDETC = 0;
>  		*BytePerPixelY = 2;


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

* Re: [PATCH] drm/amd/display: Remove duplicate/repeating expression
  2023-02-10 15:22 ` Harry Wentland
@ 2023-02-10 18:16   ` Deepak R Varma
  2023-02-15  4:23   ` Alex Deucher
  1 sibling, 0 replies; 4+ messages in thread
From: Deepak R Varma @ 2023-02-10 18:16 UTC (permalink / raw)
  To: Harry Wentland
  Cc: Leo Li, Rodrigo Siqueira, Alex Deucher, Christian König,
	Pan, Xinhui, David Airlie, Daniel Vetter, amd-gfx, dri-devel,
	linux-kernel, Saurabh Singh Sengar, Praveen Kumar,
	Deepak R Varma

On Fri, Feb 10, 2023 at 10:22:00AM -0500, Harry Wentland wrote:
> On 2/10/23 05:11, Deepak R Varma wrote:
> > Remove duplicate or repeating expressions in the if condition
> > evaluation. Issue identified using doubletest.cocci Coccinelle semantic
> > patch.
> > 
> > Signed-off-by: Deepak R Varma <drv@mailo.com>
> 
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Thank you Harry. There is another similar patch I submitted for a different
file. Could you please also review that and share your feedback?

Thank you,
./drv

> 
> Harry
> 
> > ---
> >  .../gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c b/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c
> > index 61ee9ba063a7..6576b897a512 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c
> > @@ -51,7 +51,7 @@ static bool CalculateBytePerPixelAnd256BBlockSizes(
> >  		*BytePerPixelDETC = 0;
> >  		*BytePerPixelY = 4;
> >  		*BytePerPixelC = 0;
> > -	} else if (SourcePixelFormat == dm_444_16 || SourcePixelFormat == dm_444_16) {
> > +	} else if (SourcePixelFormat == dm_444_16) {
> >  		*BytePerPixelDETY = 2;
> >  		*BytePerPixelDETC = 0;
> >  		*BytePerPixelY = 2;
> 



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

* Re: [PATCH] drm/amd/display: Remove duplicate/repeating expression
  2023-02-10 15:22 ` Harry Wentland
  2023-02-10 18:16   ` Deepak R Varma
@ 2023-02-15  4:23   ` Alex Deucher
  1 sibling, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2023-02-15  4:23 UTC (permalink / raw)
  To: Harry Wentland
  Cc: Deepak R Varma, Leo Li, Rodrigo Siqueira, Alex Deucher,
	Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
	amd-gfx, dri-devel, linux-kernel, Praveen Kumar,
	Saurabh Singh Sengar

Applied.  Thanks!

On Fri, Feb 10, 2023 at 10:22 AM Harry Wentland <harry.wentland@amd.com> wrote:
>
> On 2/10/23 05:11, Deepak R Varma wrote:
> > Remove duplicate or repeating expressions in the if condition
> > evaluation. Issue identified using doubletest.cocci Coccinelle semantic
> > patch.
> >
> > Signed-off-by: Deepak R Varma <drv@mailo.com>
>
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
>
> Harry
>
> > ---
> >  .../gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c b/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c
> > index 61ee9ba063a7..6576b897a512 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c
> > @@ -51,7 +51,7 @@ static bool CalculateBytePerPixelAnd256BBlockSizes(
> >               *BytePerPixelDETC = 0;
> >               *BytePerPixelY = 4;
> >               *BytePerPixelC = 0;
> > -     } else if (SourcePixelFormat == dm_444_16 || SourcePixelFormat == dm_444_16) {
> > +     } else if (SourcePixelFormat == dm_444_16) {
> >               *BytePerPixelDETY = 2;
> >               *BytePerPixelDETC = 0;
> >               *BytePerPixelY = 2;
>

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

end of thread, other threads:[~2023-02-15  4:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-10 10:11 [PATCH] drm/amd/display: Remove duplicate/repeating expression Deepak R Varma
2023-02-10 15:22 ` Harry Wentland
2023-02-10 18:16   ` Deepak R Varma
2023-02-15  4:23   ` 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).