lkml.org 
[lkml]   [2014]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: rtl8712: Remove redundant cast
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



\
 
 \ /
  Last update: 2014-10-21 17:41    [W:0.030 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site