[PATCH net-next] ath10k: wmi: Convert use of 6 to ETH_ALEN

Julia Lawall julia.lawall at lip6.fr
Thu Oct 3 02:32:11 EDT 2013


The following semantic patch fixes the type declarations.  It should be 
run with the argument --recursive-includes for best (but slowest) results.

julia

@@
identifier x;
expression e1;
type T;
@@

T x[
- 6
+ ETH_ALEN
];
... when any
(
memcpy(x,e1,ETH_ALEN)
|
memcpy(e1,x,ETH_ALEN)
|
memset(x,e1,ETH_ALEN)
)

@r@
type T,T1;
identifier x;
@@

T {
...
T1 x[6];
...
};

@s@
r.T *e;
identifier r.x;
expression e1;
@@

(
memcpy(e->x,e1,ETH_ALEN)
|
memcpy(e1,e->x,ETH_ALEN)
|
memset(e->x,e1,ETH_ALEN)
)

@depends on s@
type r.T,r.T1;
identifier r.x;
@@

T {
...
T1 x[
-6
+ ETH_ALEN
 ];
...
};



More information about the ath10k mailing list