public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8712: Remove redundant cast
@ 2014-10-21 14:58 Rasmus Villemoes
  2014-10-21 15:12 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Rasmus Villemoes @ 2014-10-21 14:58 UTC (permalink / raw)
  To: Larry Finger, Greg Kroah-Hartman; +Cc: devel, linux-kernel, Rasmus Villemoes

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

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
 drivers/staging/rtl8712/hal_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c
index 1d6ade0..cc6b390 100644
--- a/drivers/staging/rtl8712/hal_init.c
+++ b/drivers/staging/rtl8712/hal_init.c
@@ -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;
 }
 
-- 
2.0.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: rtl8712: Remove redundant cast
  2014-10-21 14:58 [PATCH] staging: rtl8712: Remove redundant cast Rasmus Villemoes
@ 2014-10-21 15:12 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2014-10-21 15:12 UTC (permalink / raw)
  To: Rasmus Villemoes; +Cc: Larry Finger, Greg Kroah-Hartman, devel, linux-kernel

On Tue, Oct 21, 2014 at 04:58:26PM +0200, Rasmus Villemoes wrote:
> struct firmware::data has type const u8*, as does *ppmappedfw, so the
> cast to u8* is unnecessary and slightly confusing.
> 
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> ---
>  drivers/staging/rtl8712/hal_init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c
> index 1d6ade0..cc6b390 100644
> --- a/drivers/staging/rtl8712/hal_init.c
> +++ b/drivers/staging/rtl8712/hal_init.c
> @@ -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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-21 15:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-21 14:58 [PATCH] staging: rtl8712: Remove redundant cast Rasmus Villemoes
2014-10-21 15:12 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox