drm/amd/display: Remove duplicate/repeating expression
PATCH 1/1 drm/amd/display: Remove duplicate/repeating expression
Remove duplicate or repeating expressions in the if condition evaluation. Issue identified using doubletest.cocci Coccinelle semantic patch.
--- .../gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c +1 -1
@@ -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 ;
Signature · 1 line
2.34.1
Quoted 5 lines · Deepak R Varma
Remove duplicate or repeating expressions in the if condition evaluation. Issue identified using
doubletest.cocciCoccinelle semantic patch.Signed-off-by Deepak R Varma <[email protected]>
Harry
Quoted 17 lines
--- .../gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c +1
-1@@ -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 ;
Quoted 8 lines · Harry Wentland
Quoted 5 lines · Deepak R Varma
Remove duplicate or repeating expressions in the if condition evaluation. Issue identified using
doubletest.cocciCoccinelle semantic patch.Signed-off-by Deepak R Varma <[email protected]>Reviewed-by Harry Wentland <[email protected]>
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
Quoted 21 lines
Harry
Quoted 17 lines
--- .../gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c +1
-1@@ -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 ;
Alex Deucher
AppliedApplied. Thanks!
Quoted 30 lines · Harry Wentland
Quoted 5 lines · Deepak R Varma
Remove duplicate or repeating expressions in the if condition evaluation. Issue identified using
doubletest.cocciCoccinelle semantic patch.Signed-off-by Deepak R Varma <[email protected]>Reviewed-by Harry Wentland <[email protected]>Harry
Quoted 17 lines
--- .../gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c +1
-1@@ -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 ;