summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorAishwarya Pant <aishpant@gmail.com>2017-12-11 12:23:57 -0500
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-29 06:24:18 -0500
commit5fac8da586d3c463d02813f2968ca7d74a7ef9a2 (patch)
treedd4766c47193ee83613c30661b0090f4521e931e /tools/perf/scripts/python/export-to-postgresql.py
parenteae79ed5969022c66d8ee6aad27a5693c5cff4bd (diff)
media: staging: atomisp2: replace DEVICE_ATTR with DEVICE_ATTR_RO
This is a clean-up patch which replaces DEVICE_ATTR() macro with file permission specific DEVICE_ATTR_RO() macro for compaction and readability. Done using coccinelle: @r@ identifier attr, show_fn; declarer name DEVICE_ATTR; @@ DEVICE_ATTR(attr, \(S_IRUGO\|0444\), show_fn, NULL); @script: python p@ attr_show; attr << r.attr; @@ // standardise the show fn name to {attr}_show coccinelle.attr_show = attr + "_show" @@ identifier r.attr, r.show_fn; declarer name DEVICE_ATTR_RO; @@ // change the attr declaration - DEVICE_ATTR(attr, \(S_IRUGO\|0444\), show_fn, NULL); + DEVICE_ATTR_RO(attr); @rr@ identifier r.show_fn, p.attr_show; @@ // rename the show function - show_fn + attr_show (...) { ... } @depends on rr@ identifier r.show_fn, p.attr_show; @@ // rename fn usages - show_fun + attr_show Signed-off-by: Aishwarya Pant <aishpant@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions