• Tobin C. Harding's avatar
    staging: ks7010: fix complete_handler · 055da4f9
    Tobin C. Harding authored
    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: default avatarTobin C. Harding <me@tobin.cc>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    055da4f9
ks7010_sdio.h 3.39 KB