Skip to contentSkip to conversation

Staging: rtl8712: Remove unnecessary type cast.

PATCH In review Vatika Harlalka 2 participants 3 messages Mar 3, 2015 – Mar 7, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: rtl8712: Remove unnecessary type cast.

Using addressof and then casting to the original type is unneeded. So these casts can be removed.
Issue detected via Coccinelle script.

---
 drivers/staging/rtl8712/hal_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8711/hal_init.c renamed from drivers/staging/rtl8712/hal_init.c +1 -1
index 324da34..0a1c631 100644
@@ -92,7 +92,7 @@ static u32 rtl871x_open_fw(struct _adapter *padapter, const u8 **ppmappedfw)
 
 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));
Signature · 1 line
1.9.1
maintainer
#1 lore raw

drivers/staging/rtl8711/hal_init.c

Quoted 13 lines · Vatika Harlalka

Using addressof and then casting to the original type is unneeded. So these casts can be removed.
Issue detected via Coccinelle script.

---
 drivers/staging/rtl8712/hal_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8711/hal_init.c renamed from drivers/staging/rtl8712/hal_init.c +0 -0
index 324da34..0a1c631 100644

This patch is malformed, with the directory name different. This "breaks" git, but not patch, and I've now notified the git developers about it. How did you create a patch like this?

Can you fix it up and resend it?

thanks,

greg k-h

#2 lore raw

I had checked that the patch is valid and then used --in-place option in coccinelle and git format-patch to create the patch. I'm very confused at to how exactly the directory name is different! I'll redo it and send in another one.
Thanks!