[PATCH linux-next] drm/amd/pm: Remove the unneeded result variable

2022-09-20 Thread cgel . zte
From: ye xingchen Return the value append_vbios_pptable() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- .../gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-)

[PATCH linux-next] drm/amd/pm: Remove unneeded result variable

2022-09-20 Thread cgel . zte
From: ye xingchen Return the value atomctrl_initialize_mc_reg_table_v2_2() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c | 4 +--- 1 file changed, 1 insertion(+),

[PATCH linux-next] drm/amd/display/amdgpu_dm: remove duplicate included header files

2022-09-12 Thread cgel . zte
From: Xu Panda soc15_common.h is included more than once. Reported-by: Zeal Robot Signed-off-by: Xu Panda --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display

[PATCH linux-next] drm/amd/display: Remove the unneeded result variable

2022-09-05 Thread cgel . zte
From: zhang songyi Return the enable_link_dp() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: zhang songyi --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/g

[PATCH linux-next] drm/amdgpu: Remove the unneeded result variable

2022-09-05 Thread cgel . zte
From: zhang songyi Return the sdma_v6_0_start() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: zhang songyi --- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/

[PATCH linux-next] drm/radeon: Remove the unneeded result variable

2022-09-02 Thread cgel . zte
From: ye xingchen Return the value radeon_drm_ioctl() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- drivers/gpu/drm/radeon/radeon_drv.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/dr

[PATCH linux-next] drm/radeon/ci_dpm: Remove the unneeded result variable

2022-09-02 Thread cgel . zte
From: ye xingchen Return the value ci_load_smc_ucode() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- drivers/gpu/drm/radeon/ci_dpm.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm

[PATCH linux-next] drm/amdgpu: Remove the unneeded result variable 'r'

2022-08-30 Thread cgel . zte
From: ye xingchen Return the value sdma_v4_0_start() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/

[PATCH linux-next] drm/amd/display: remove redundant vertical_line_start variable

2022-08-29 Thread cgel . zte
From: Jinpeng Cui Return value from expression directly instead of taking this in another redundant variable. Reported-by: Zeal Robot Signed-off-by: Jinpeng Cui --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

[PATCH linux-next] drm/amdkfd: remove redundant variables err and ret

2022-08-29 Thread cgel . zte
From: Jinpeng Cui Return value from kfd_wait_on_events() and io_remap_pfn_range() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot Signed-off-by: Jinpeng Cui --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 9 ++--- 1 file changed, 2 insertions(+), 7 de

[PATCH linux-next] drm/amdgpu: Remove the unneeded result variable

2022-08-27 Thread cgel . zte
From: ye xingchen Return the value sdma_v5_2_start() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/

[PATCH] drm/amdgpu: simplify the return expression of vega10_ih_hw_init()

2022-05-04 Thread cgel . zte
From: Minghao Chi Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vega10_ih.c b/drivers/gpu/drm/amd/amdgpu/vega10

[PATCH] drm/amdgpu: simplify the return expression

2022-05-04 Thread cgel . zte
From: Minghao Chi Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdg

[PATCH] drm/amdgpu: simplify the return expression of iceland_ih_hw_init

2022-04-29 Thread cgel . zte
From: Minghao Chi Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/iceland_ih.c b/drivers/gpu/drm/amd/amdgpu/icel

[PATCH] drm/amdgpu: simplify the return expression of navi10_ih_hw_init()

2022-04-29 Thread cgel . zte
From: Minghao Chi Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c b/drivers/gpu/drm/amd/amdgpu/navi10

[PATCH] drivers: Fix spelling mistake "writting" -> "writing"

2022-04-08 Thread cgel . zte
From: Lv Ruyi There are some spelling mistakes in the comments. Fix it. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +- drivers/gpu/drm/i915/i915_request.c | 2 +- drivers/net/ethernet/sfc/mcdi_pcol.h

[PATCH] drm/amd/dc:: remove duplicate include

2022-04-06 Thread cgel . zte
From: Lv Ruyi 'dm_services.h' included in 'freesync,c' is duplicated, so remove one. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/modules/freesync/frees

[PATCH] drm/amdkfd: Replace one-element array with flexible-array member

2022-02-18 Thread cgel . zte
From: Changcheng Deng There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use "flexible array members" for these cases. The older style of one-element or zero-length arrays should no longer

[PATCH] drm/amdkfd: Replace zero-length array with flexible-array member

2022-02-15 Thread cgel . zte
From: Changcheng Deng There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use "flexible array members" for these cases. The older style of one-element or zero-length arrays should no longer

[PATCH] drm/amdgpu: remove duplicate include in 'amdgpu_device.c'

2022-01-28 Thread cgel . zte
From: Changcheng Deng 'linux/pci.h' included in 'amdgpu_device.c' is duplicated. Reported-by: Zeal Robot Signed-off-by: Changcheng Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/d

[PATCH] drm/amd/pm: remove duplicate include in 'arcturus_ppt.c'

2022-01-28 Thread cgel . zte
From: Changcheng Deng 'amdgpu_dpm.h' included in 'arcturus_ppt.c' is duplicated. Reported-by: Zeal Robot Signed-off-by: Changcheng Deng --- drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c b

[PATCH] amdgpu/amdgpu_psp: remove unneeded ret variable

2022-01-18 Thread cgel . zte
From: Minghao Chi Return value from amdgpu_bo_create_kernel() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Signed-off-by: CGEL ZTE --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 +- 1 file changed, 1 insertion(+), 5

[PATCH] drm/amdgpu: remove duplicate include

2022-01-15 Thread cgel . zte
From: Changcheng Deng 'drm/drm_drv.h' included in 'amdgpu_ttm.c' is duplicated. It is also included on 53 line. Reported-by: Zeal Robot Signed-off-by: Changcheng Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amd

[PATCH] drm/amd/pm: Replace one-element array with flexible-array member

2022-01-14 Thread cgel . zte
From: Changcheng Deng There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use "flexible array members" for these cases. The older style of one-element or zero-length arrays should no longer

[PATCH] drm/amdkfd: use max() and min() to make code cleaner

2021-12-15 Thread cgel . zte
From: Changcheng Deng Use max() and min() in order to make code cleaner. Reported-by: Zeal Robot Signed-off-by: Changcheng Deng --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/

[PATCH] drm:amdgpu:remove unneeded variable

2021-12-09 Thread cgel . zte
From: chiminghao return value form directly instead of taking this in another redundant variable. Reported-by: Zeal Robot Signed-off-by: chiminghao --- drivers/gpu/drm/amd/amdgpu/amdgpu_ioc32.c | 5 + drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 6 ++ 2 files changed, 3 insertions(+),

[PATCH] drm/amd/display: fix application of sizeof to pointer

2021-11-24 Thread cgel . zte
From: Lv Ruyi Both of split and merge are pointers, not arrays. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- drivers/gpu/drm/amd/display/dc/dml/dml_wrapper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml/dml_wrapper.c b/drive

[PATCH] drm/amd/display: fix cond_no_effect.cocci warnings

2021-11-12 Thread cgel . zte
From: Ye Guojin This was found by coccicheck: ./drivers/gpu/drm/amd/display/dc/core/dc_resource.c, 2516, 7-9, WARNING possible condition with no effect (if == else) hdmi_info.bits.YQ0_YQ1 is always YYC_QUANTIZATION_LIMITED_RANGE. Reported-by: Zeal Robot Signed-off-by: Ye Guojin --- drivers/g

[PATCH] drm/amdgpu: remove unneeded variable

2021-11-10 Thread cgel . zte
From: ran jianping Fix the following coccicheck review: ./drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c:1174:14-18 :Unneeded variable Remove unneeded variable used to store return value. Reported-by: Zeal Robot Signed-off-by: ran jianping --- drivers/gpu/drm/amd/pm/swsmu/smu11/sien

[PATCH] drm/amd/display: remove unnecessary conditional operators

2021-11-02 Thread cgel . zte
From: Ye Guojin Since the variables named is_end_of_payload and hpd_status are already bool type, the ?: conditional operator is unnecessary any more. Clean them up here. Reported-by: Zeal Robot Signed-off-by: Ye Guojin --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-- drivers/g

[PATCH] drm/amd/display: remove duplicate include in dcn201_clk_mgr.c

2021-10-08 Thread cgel . zte
From: Lv Ruyi Remove all but the first include of reg_helper.h and core_types.h from dcn201_clk_mgr.c. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- .../gpu/drm/amd/display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c| 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/disp