[PATCH v1] drm/xe: Use ERR_CAST to return an error-valued pointer

2024-09-06 Thread Yu Jiaoliang
Instead of directly casting and returning an error-valued pointer, use ERR_CAST to make the error handling more explicit and improve code clarity. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/xe/xe_sa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe

[PATCH v1 6/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display

[PATCH v1 5/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/dc/spl/dc_spl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/spl/dc_spl.c b/drivers/gpu/drm/amd/display/dc/spl/dc_spl.c index

[PATCH v1 4/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c index

[PATCH v1 3/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core

[PATCH v1 2/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c b/drivers/gpu/drm/amd

[PATCH v1 1/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c b/drivers/gpu/drm/amd/display/dc/bios

[PATCH v1 0/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
*** BLURB HERE *** Yu Jiaoliang (6): drm/amd/display: Use max/min macro drm/amd/display: Use max/min macro drm/amd/display: Use max/min macro drm/amd/display: Use max/min macro drm/amd/display: Use max/min macro drm/amd/display: Use max/min macro drivers/gpu/drm/amd/display/dc/bios

[PATCH v1 6/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display

[PATCH v1 5/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/dc/spl/dc_spl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/spl/dc_spl.c b/drivers/gpu/drm/amd/display/dc/spl/dc_spl.c index

[PATCH v1 4/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c index

[PATCH v1 3/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core

[PATCH v1 2/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c b/drivers/gpu/drm/amd

[PATCH v1 1/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c b/drivers/gpu/drm/amd/display/dc/bios

[PATCH v1 0/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
*** BLURB HERE *** Yu Jiaoliang (6): drm/amd/display: Use max/min macro drm/amd/display: Use max/min macro drm/amd/display: Use max/min macro drm/amd/display: Use max/min macro drm/amd/display: Use max/min macro drm/amd/display: Use max/min macro drivers/gpu/drm/amd/display/dc/bios

[PATCH v1 6/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display

[PATCH v1 5/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/dc/spl/dc_spl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/spl/dc_spl.c b/drivers/gpu/drm/amd/display/dc/spl/dc_spl.c index

[PATCH v1 4/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c index

[PATCH v1 3/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core

[PATCH v1 2/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c b/drivers/gpu/drm/amd

[PATCH v1 1/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c b/drivers/gpu/drm/amd/display/dc/bios

[PATCH v1 0/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
*** BLURB HERE *** Yu Jiaoliang (6): drm/amd/display: Use max/min macro drm/amd/display: Use max/min macro drm/amd/display: Use max/min macro drm/amd/display: Use max/min macro drm/amd/display: Use max/min macro drm/amd/display: Use max/min macro drivers/gpu/drm/amd/display/dc/bios

[PATCH v1 6/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display

[PATCH v1 5/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/dc/spl/dc_spl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/spl/dc_spl.c b/drivers/gpu/drm/amd/display/dc/spl/dc_spl.c index

[PATCH v1 4/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c index

[PATCH v1 3/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core

[PATCH v1 2/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c b/drivers/gpu/drm/amd

[PATCH v1 1/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
Use the macro instead of ternary operator. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c b/drivers/gpu/drm/amd/display/dc/bios

[PATCH v1 0/6] drm/amd/display: Use max/min macro

2024-08-21 Thread Yu Jiaoliang
*** BLURB HERE *** Yu Jiaoliang (6): drm/amd/display: Use max/min macro drm/amd/display: Use max/min macro drm/amd/display: Use max/min macro drm/amd/display: Use max/min macro drm/amd/display: Use max/min macro drm/amd/display: Use max/min macro drivers/gpu/drm/amd/display/dc/bios

[PATCH v1] drm/connector: Use kmemdup_array instead of kmemdup for multiple allocation

2024-08-21 Thread Yu Jiaoliang
Let the kememdup_array() take care about multiplication and possible overflows. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/drm_connector.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index

[PATCH v3] drm/i915/gt: Use kmemdup_array instead of kmemdup for multiple allocation

2024-08-20 Thread Yu Jiaoliang
Let the kememdup_array() take care about multiplication and possible overflows. v2: - Change subject - Leave one blank line between the commit log and the tag section - Fix code alignment issue v3: - Fix code alignment - Apply the patch on a clean drm-tip Signed-off-by: Yu Jiaoliang Reviewed

[PATCH v2] drm/i915/gt: Use kmemdup_array instead of kmemdup for multiple allocation

2024-08-20 Thread Yu Jiaoliang
Let the kememdup_array() take care about multiplication and possible overflows. v2: - Change subject - Leave one blank line between the commit log and the tag section - Fix code alignment issue Signed-off-by: Yu Jiaoliang Reviewed-by: Jani Nikula Reviewed-by: Andi Shyti --- drivers/gpu/drm

[PATCH v1] drivers:gt:Switch to use kmemdup_array()

2024-08-20 Thread Yu Jiaoliang
Let the kememdup_array() take care about multiplication and possible overflows. Signed-off-by: Yu Jiaoliang --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915