Using addressof and then casting to the original type is unneeded.
So these casts can be removed.
Issue detected via Coccinelle script.
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
static void fill_fwpriv(struct _adapter *padapter, struct fw_priv *pfwpriv)
{
- struct dvobj_priv *pdvobj = (struct dvobj_priv *)&padapter->dvobjpriv;
+ struct dvobj_priv *pdvobj = &padapter->dvobjpriv;
struct registry_priv *pregpriv = &padapter->registrypriv;
memset(pfwpriv, 0, sizeof(struct fw_priv));