drm/amdgpu: use true,false for bool variable
Subsystems (2)
cover drm/amdgpu: use true,false for bool variable
zhengbin (5):
drm/amdgpu: use true,false for bool variable in mxgpu_ai.c drm/amdgpu: use true,false for bool variable in mxgpu_nv.c drm/amdgpu: use true,false for bool variable in amdgpu_device.c drm/amdgpu: use true,false for bool variable in amdgpu_debugfs.c drm/amdgpu: use true,false for bool variable in amdgpu_psp.c
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 12 ++++++------ drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-)
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 1/5 drm/amdgpu: use true, false for bool variable in mxgpu_ai.c
Fixes coccicheck warning:
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c:253:2-20: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c:265:2-20: WARNING: Assignment of 0/1 to bool variable
--- drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c +2 -2
@@ -250,7 +250,7 @@ static void xgpu_ai_mailbox_flr_work(struct work_struct *work)*/ locked =mutex_trylock (&adev->lock_reset);if (locked) - adev->in_gpu_reset =1 ; + adev->in_gpu_reset = true; do { if (xgpu_ai_mailbox_peek_msg(adev) == IDH_FLR_NOTIFICATION_CMPL)
@@ -262,7 +262,7 @@ static void xgpu_ai_mailbox_flr_work(struct work_struct *work) flr_done:if (locked) { - adev->in_gpu_reset =0 ; + adev->in_gpu_reset = false;mutex_unlock (&adev->lock_reset); }
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/5 drm/amdgpu: use true, false for bool variable in mxgpu_nv.c
In reply to zhengbinFixes coccicheck warning:
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c:255:2-20: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c:267:2-20: WARNING: Assignment of 0/1 to bool variable
--- drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c +2 -2
@@ -252,7 +252,7 @@ static void xgpu_nv_mailbox_flr_work(struct work_struct *work)*/ locked =mutex_trylock (&adev->lock_reset);if (locked) - adev->in_gpu_reset =1 ; + adev->in_gpu_reset = true; do { if (xgpu_nv_mailbox_peek_msg(adev) == IDH_FLR_NOTIFICATION_CMPL)
@@ -264,7 +264,7 @@ static void xgpu_nv_mailbox_flr_work(struct work_struct *work) flr_done:if (locked) { - adev->in_gpu_reset =0 ; + adev->in_gpu_reset = false;mutex_unlock (&adev->lock_reset); }
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/5 drm/amdgpu: use true, false for bool variable in amdgpu_device.c
In reply to zhengbinFixes coccicheck warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3961:1-19: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3981:1-19: WARNING: Assignment of 0/1 to bool variable
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
@@ -3958,7 +3958,7 @@ static bool amdgpu_device_lock_adev(struct amdgpu_device *adev, bool trylock)mutex_lock (&adev->lock_reset);atomic_inc (&adev->gpu_reset_counter); - adev->in_gpu_reset =1 ; + adev->in_gpu_reset = true;switch (amdgpu_asic_reset_method (adev)) {case AMD_RESET_METHOD_MODE1 : adev->mp1_state =PP_MP1_STATE_SHUTDOWN ;
@@ -3978,7 +3978,7 @@ static void amdgpu_device_unlock_adev(struct amdgpu_device *adev) {amdgpu_vf_error_trans_all (adev); adev->mp1_state =PP_MP1_STATE_NONE ; - adev->in_gpu_reset =0 ; + adev->in_gpu_reset = false;mutex_unlock (&adev->lock_reset); }
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/5 drm/amdgpu: use true, false for bool variable in amdgpu_debugfs.c
In reply to zhengbinFixes coccicheck warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:132:2-10: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:140:2-10: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:142:13-21: WARNING: Assignment of 0/1 to bool variable
--- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +3 -3
@@ -129,7 +129,7 @@ static int amdgpu_debugfs_process_reg_op(bool read, struct file *f, sh_bank =0xFFFFFFFF ;if (instance_bank ==0x3FF ) instance_bank =0xFFFFFFFF ; - use_bank =1 ; + use_bank = true; }else if (*pos & (1ULL <<61 )) { me = (*pos &GENMASK_ULL (33 ,24 )) >>24 ;
@@ -137,9 +137,9 @@ static int amdgpu_debugfs_process_reg_op(bool read, struct file *f, queue = (*pos &GENMASK_ULL (53 ,44 )) >>44 ; vmid = (*pos &GENMASK_ULL (58 ,54 )) >>54 ; - use_ring =1 ; + use_ring = true; }else { - use_bank = use_ring =0 ; + use_bank = use_ring = false; } *pos &= (1UL <<22 ) -1 ;
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/5 drm/amdgpu: use true, false for bool variable in amdgpu_psp.c
In reply to zhengbinFixes coccicheck warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:674:2-26: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:794:1-25: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:897:2-36: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:1016:1-35: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:1087:2-34: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:1177:1-33: WARNING: Assignment of 0/1 to bool variable
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +6 -6
@@ -671,7 +671,7 @@ static int psp_ras_load(struct psp_context *psp) psp->fence_buf_mc_addr);if (!ret) { - psp->ras.ras_initialized =1 ; + psp->ras.ras_initialized = true; psp->ras.session_id = cmd->resp.session_id; }
@@ -791,7 +791,7 @@ static int psp_ras_terminate(struct psp_context *psp)if (ret)return ret; - psp->ras.ras_initialized =0 ; + psp->ras.ras_initialized = false;/* free ras shared memory */ amdgpu_bo_free_kernel(&psp->ras.ras_shared_bo,
@@ -894,7 +894,7 @@ static int psp_hdcp_load(struct psp_context *psp) ret =psp_cmd_submit_buf (psp,NULL , cmd, psp->fence_buf_mc_addr);if (!ret) { - psp->hdcp_context.hdcp_initialized =1 ; + psp->hdcp_context.hdcp_initialized = true; psp->hdcp_context.session_id = cmd->resp.session_id; }
@@ -1013,7 +1013,7 @@ static int psp_hdcp_terminate(struct psp_context *psp)if (ret)return ret; - psp->hdcp_context.hdcp_initialized =0 ; + psp->hdcp_context.hdcp_initialized = false;/* free hdcp shared memory */ amdgpu_bo_free_kernel(&psp->hdcp_context.hdcp_shared_bo,
@@ -1084,7 +1084,7 @@ static int psp_dtm_load(struct psp_context *psp) ret =psp_cmd_submit_buf (psp,NULL , cmd, psp->fence_buf_mc_addr);if (!ret) { - psp->dtm_context.dtm_initialized =1 ; + psp->dtm_context.dtm_initialized = true; psp->dtm_context.session_id = cmd->resp.session_id; }
@@ -1174,7 +1174,7 @@ static int psp_dtm_terminate(struct psp_context *psp)if (ret)return ret; - psp->dtm_context.dtm_initialized =0 ; + psp->dtm_context.dtm_initialized = false;/* free hdcp shared memory */ amdgpu_bo_free_kernel(&psp->dtm_context.dtm_shared_bo,
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Alex Deucher
AppliedQuoted 7 lines · zhengbin
zhengbin (5):
drm/amdgpu: use true,false for bool variable inmxgpu_ai.cdrm/amdgpu: use true,false for bool variable inmxgpu_nv.cdrm/amdgpu: use true,false for bool variable inamdgpu_device.cdrm/amdgpu: use true,false for bool variable inamdgpu_debugfs.cdrm/amdgpu: use true,false for bool variable inamdgpu_psp.c
Applied the series. Thanks!
Alex
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 12 ++++++------ drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-)
Quoted 7 lines
--
2.7.4_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx