Skip to contentSkip to conversation

staging: rtl8712: Remove redundant cast

PATCH In review Rasmus Villemoes 2 participants 2 messages Oct 21, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8712: Remove redundant cast

struct firmware::data has type const u8*, as does *ppmappedfw, so the cast to u8* is unnecessary and slightly confusing.

---
 drivers/staging/rtl8712/hal_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8712/hal_init.c +1 -1
index 1d6ade0..cc6b390 100644
@@ -86,7 +86,7 @@ static u32 rtl871x_open_fw(struct _adapter *padapter, const u8 **ppmappedfw)
 			(int)padapter->fw->size);
 		return 0;
 	}
-	*ppmappedfw = (u8 *)((*praw)->data);
+	*ppmappedfw = ((*praw)->data);
 	return (*praw)->size;
 }
 
Signature · 1 line
2.0.4
#1 lore raw
Quoted 13 lines · Rasmus Villemoes

struct firmware::data has type const u8*, as does *ppmappedfw, so the cast to u8* is unnecessary and slightly confusing.

---
 drivers/staging/rtl8712/hal_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8712/hal_init.c +0 -0
index 1d6ade0..cc6b390 100644

drivers/staging/rtl8712/hal_init.c static u32 rtl871x_open_fw(struct _adapter *padapter, const u8 **ppmappedfw) · line 89

Quoted 5 lines
drivers/staging/rtl8712/hal_init.c +1 -1
@@ -86,7 +86,7 @@ static u32 rtl871x_open_fw(struct _adapter *padapter, const u8 **ppmappedfw)
 			(int)padapter->fw->size);
 		return 0;
 	}
-	*ppmappedfw = (u8 *)((*praw)->data);
+	*ppmappedfw = ((*praw)->data);

Remove the unneeded parens as well, please.

regards,
dan carpenter