OSDN Git Service

staging: ks7010: fix complete_handler
authorTobin C. Harding <me@tobin.cc>
Tue, 18 Apr 2017 00:35:31 +0000 (10:35 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Apr 2017 11:33:17 +0000 (13:33 +0200)
commit055da4f9b95dd2a50c653b5a4559b9186081fb75
tree8f91997ee9dd1d14078db7d756721c97ff60e8af
parent68711cebcbb4dd7f5c05245715eefa4f4d4be760
staging: ks7010: fix complete_handler

complete_handler() takes void * types as parameters. void * parameters are then
cast to struct types. Call sites for this function either pass in NULL
or pointers to the struct types cast to void *. This casting is
unnecessary and can be removed.

Struct tx_device_buffer (which contains a pointer member to the
complete_handler() function) has as member 'ks_wlan_priv *priv' this is
unnecessary, we always have a pointer to this struct there is no need
to store it here.

The complete_handler can be more clearly defined by using struct
pointer types instead of void * types. The code is currently
unnecessarily complex, storing and passing extraneous pointer
parameters.

Remove unnecessary parameters, unnecessary casting to/from 'void
*'. Fix all call sites involving complete_handler().

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks7010_sdio.c
drivers/staging/ks7010/ks7010_sdio.h
drivers/staging/ks7010/ks_hostif.c
drivers/staging/ks7010/ks_hostif.h
drivers/staging/ks7010/ks_wlan_net.c