From f7f8f9a7fadc66eca8966d11806065ae673514cc Mon Sep 17 00:00:00 2001 From: Costa Shulyupin Date: Thu, 26 Jul 2018 08:36:33 +0300 Subject: [PATCH] *cflow_preprocess --- srcxray.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/srcxray.py b/srcxray.py index dd5f8f7..785a2ad 100755 --- a/srcxray.py +++ b/srcxray.py @@ -427,10 +427,13 @@ def cflow_preprocess(a): with open(a, 'r') as f: for s in f: # treat struct like function + s = re.sub(r"^static struct (.*) = ", r"\1()", s) + s = re.sub(r"^static struct (.*)\[\] = ", r"\1()", s) s = re.sub(r"^static const struct (.*)\[\] = ", r"\1()", s) s = re.sub(r"^static __initdata int \(\*actions\[\]\)\(void\) = ", "int actions()", s) # treat struct like function s = re.sub(r"^static ", "", s) + s = re.sub(r"SENSOR_DEVICE_ATTR.*\((\w*),", r"void sensor_dev_attr_\1()(", s) s = re.sub(r"COMPAT_SYSCALL_DEFINE[0-9]\((\w*),", r"compat_sys_\1(", s) s = re.sub(r"SYSCALL_DEFINE[0-9]\((\w*),", r"sys_\1(", s)