staging: ft1000: ft1000-usb: ft1000_download.c: adjust function arguments
authorAya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Tue, 10 Mar 2015 17:03:18 +0000 (19:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 15 Mar 2015 17:41:12 +0000 (18:41 +0100)
commit6e2fef9d3260e169c17fc5eea842ff4c64c23e5c
tree149d5e9903d6341419bd0586e257395ded307e26
parentcb53b00de93d4a165b31781e9d4598415e3c07a4
staging: ft1000: ft1000-usb: ft1000_download.c: adjust function arguments

Handles the following issues:

Removing extra parentheses around function arguments,
Removing unnecessary pointer to pointer 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-usb/ft1000_download.c