[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5D70A196.3020106@huawei.com>
Date: Thu, 5 Sep 2019 13:48:06 +0800
From: zhong jiang <zhongjiang@...wei.com>
To: Markus Elfring <Markus.Elfring@....de>
CC: LKML <linux-kernel@...r.kernel.org>
Subject: Re: drm/amdgpu: remove the redundant null check
On 2019/9/5 1:50, Markus Elfring wrote:
>> 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 check such arguments
> around the calls. Thus remove the extra condition check at two places.
>
It's better, Thanks
>> No functional change.
> I find this information questionable while it is partly reasonable
> according to the shown software refactoring.
>
> Can a subject like “[PATCH] drm/amdgpu: Remove two redundant
> null pointer checks” be nicer here?
>
It's more clearer, thanks, Will repost using above description in v2.
> 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/.
Sincerely,
zhong jiang
> Regards,
> Markus
>
> .
>
Powered by blists - more mailing lists