Re: drm/amdgpu: remove the redundant null check

2019-09-13 Thread Alex Deucher
On Fri, Sep 6, 2019 at 3:01 AM zhong jiang wrote: > > On 2019/9/5 16:38, Markus Elfring wrote: > >>> Were any source code analysis tools involved for finding > >>> these update candidates? > >> With the help of Coccinelle. You can find out some example in > >> scripts/coccinelle/. > > Thanks for

Re: drm/amdgpu: remove the redundant null check

2019-09-05 Thread zhong jiang
On 2019/9/5 16:38, Markus Elfring wrote: >>> Were any source code analysis tools involved for finding >>> these update candidates? >> With the help of Coccinelle. You can find out some example in >> scripts/coccinelle/. > Thanks for such background information. > Was the script “ifnullfree.cocci”

Re: drm/amdgpu: remove the redundant null check

2019-09-05 Thread Markus Elfring
>> Were any source code analysis tools involved for finding >> these update candidates? > With the help of Coccinelle. You can find out some example in > scripts/coccinelle/. Thanks for such background information. Was the script “ifnullfree.cocci” applied here? Will it be helpful to add

Re: drm/amdgpu: remove the redundant null check

2019-09-04 Thread Markus Elfring
> debugfs_remove and kfree has taken the null check in account. > hence it is unnecessary to check it. Just remove the condition. How do you think about a wording like the following? The functions “debugfs_remove” and “kfree” tolerate the passing of null pointers. Hence it is unnecessary to

[PATCH] drm/amdgpu: remove the redundant null check

2019-09-03 Thread zhong jiang
debugfs_remove and kfree has taken the null check in account. hence it is unnecessary to check it. Just remove the condition. No functional change. Signed-off-by: zhong jiang --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git