aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorBhanusree Pola <bhanusreemahesh@gmail.com>2019-03-22 10:38:16 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-22 15:20:25 +0100
commit561fb35a9d04ca7d1a5b955bcac50c6c4f49227d (patch)
treec5de1abbc9bcc11a2bc119d9d33cc850d5415131 /tools/perf/scripts/python
parentstaging: rtl8188eu: remove unnecessary parentheses (diff)
staging: erofs: Use !x or x in place of NULL comparision
Test for NULL as !x instead of NULL comparisions. Issue found using coccinelle Semantic patch used to solve the problem is as follows // <smpl> @@ expression x; statement S; @@ x = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\| usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\)(...)); -if(x==NULL) +if(!x) S @@ expression e; @@ -e == NULL +!e // </smpl> Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> [ Gao Xiang: fix x != NULL comparision to x as well. ] Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions