]> git.karo-electronics.de Git - linux-beck.git/commit
Staging: android: ashmem.c: Convert macros page_range_{subsumes/subsumed_by/in}_range...
authorBhumika Goyal <bhumirks@gmail.com>
Fri, 11 Mar 2016 14:03:05 +0000 (19:33 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
commitc0ece6c383f84e0c408347cdb59456017a2f9e27
tree65803365e102e8f2e2e2ebef09326b05d51c1ed2
parente2a83f328f55b12b896c1467631ca414ac22980f
Staging: android: ashmem.c: Convert macros page_range_{subsumes/subsumed_by/in}_range to static inline function

Convert macros page_range_{subsumes/subsumed_by/in}_range to static
inline function as static inline functions are preferred over macros.
The change can be done as the arguments at all call sites have the same
type. Also, all three macro have same type of arguments and return
values so they can converted using a common semantic patch.

@r@
identifier f;
expression e;
@@
#define f(...) e

@r2@
identifier r.f;
identifier range,start,end;
expression r.e;
@@
- #define f(range,start,end) e
+ static inline int f(struct ashmem_range *range, size_t start, size_t end)
+{
+ return e;
+}

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ashmem.c