staging: ft1000: ft1000-pcmcia: adjust function arguments
authorAya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Tue, 10 Mar 2015 17:01:41 +0000 (19:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 15 Mar 2015 17:41:12 +0000 (18:41 +0100)
commit562b11b3a9304cfd55fa06f932f45879018c9792
tree6827b23ebb500a17d63f34d902647ddaa3191ddd
parent08a02cb8834d8a09502358b08929897e3ffb6abf
staging: ft1000: ft1000-pcmcia: adjust function arguments

Handles the following issues:

Removing extra parentheses around function arguments,
Removing unnecessary pointer to potinter cast.

Issues were detected using the following coccinelle
script:

@@
expression e;
type t;
identifier f;
@@

f(...,
-(t *)
e
,...)

@@
expression e;
identifier f;
@@

f(...,
&
-(
e
-)
,...)

@@
expression e;
identifier f;
@@

f(...,
-(
e
-)
,...)

Parentheses removal were left to the script. However, handling pointer
casts were done manually because not all replacements generated by the
script were suitable. In general, the following cases were discarded:

pointer casts in macros,
pointer casts on function arguments in the form of:
<func>(...,(<type> *)&<expression>,...)

since both cases generated compilation warnings.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c