aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorJulia Lawall <[email protected]>2018-05-21 11:49:10 +0200
committerJonathan Cameron <[email protected]>2018-08-19 20:16:39 +0100
commitce7c637a8368d0293649a4acc0b89930295cb62a (patch)
treec77397ced609bd7f428bf0cd1c2216a1c2174c50 /tools/perf/scripts/python/stackcollapse.py
parent892e62fab4983656d3ca5df4e83fdf2b496c06e4 (diff)
iio: potentiometer: 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 <[email protected]> Reviewed-by: Peter Rosin <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions