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

Handles the following issues:

Removing extra parentheses around function arguments,
Removing unnecessary pointer to pointer casts.

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, there were some
cases that were handled manually. In addition, handling pointer casts
were done manually too because not all replacements generated by the
script were suitable. When pointer casts on function arguments were
in the form:
    <func>(...,(<type> *)&<expression>,...)

the replacements were discarded due to 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_hw.c