Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit cb53b00d authored by Aya Mahfouz's avatar Aya Mahfouz Committed by Greg Kroah-Hartman
Browse files

staging: ft1000: ft1000-usb: 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: default avatarAya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 562b11b3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment