diff options
| author | Julia Lawall <Julia.Lawall@lip6.fr> | 2018-05-21 12:49:09 +0300 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2018-07-08 12:35:17 +0300 |
| commit | 794ac821cc44e4d148df36eb330a7e9729c06a82 (patch) | |
| tree | 963a3cc820c1763def6b84c93a51bfc8b4833fcb /tools/perf/scripts/python/call-graph-from-sql.py | |
| parent | 777baca07ef179301e363b10a14c428e5ebbd6a6 (diff) | |
| download | linux-794ac821cc44e4d148df36eb330a7e9729c06a82.tar.xz | |
iio: adc: max1363: merge calls to of_match_device and of_device_get_match_data
Drop call to of_match_device, which is subsumed by the subsequent
call to of_device_get_match_data. The code becomes simpler, and a
temporary variable can be dropped.
The semantic match that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r@
local idexpression match;
identifier i;
expression x, dev, e, e1;
@@
- match@i = of_match_device(x, dev);
- if (match) e = of_device_get_match_data(dev);
- else e = e1;
+ e = of_device_get_match_data(dev);
+ if (!e) e = e1;
@@
identifier r.i;
@@
- const struct of_device_id *i;
... when != i
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions
