lkml.org 
[lkml]   [2013]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] drivers: staging: dgap: Remove useless casting in dgap_parse.c
From
2013/10/16 Geyslan G. Bem <geyslan@gmail.com>:
> Casting (void *) value returned by kmalloc is useless
> as mentioned in Documentation/CodingStyle, Chap 14.
>
> Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
> ---
> drivers/staging/dgap/dgap_parse.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/dgap/dgap_parse.c b/drivers/staging/dgap/dgap_parse.c
> index 5497e6d..d41aa1c 100644
> --- a/drivers/staging/dgap/dgap_parse.c
> +++ b/drivers/staging/dgap/dgap_parse.c
> @@ -1013,7 +1013,7 @@ static void dgap_err(char *s)
> static struct cnode *dgap_newnode(int t)
> {
> struct cnode *n;
> - if ( (n = (struct cnode *) kmalloc(sizeof(struct cnode ), GFP_ATOMIC) ) != NULL) {
> + if ( (n = kmalloc(sizeof(struct cnode ), GFP_ATOMIC) ) != NULL) {
> memset( (char *)n, 0, sizeof(struct cnode ) );
> n->type = t;
> }
> --
> 1.8.4
>

Please, disregard this one. I have compared against staging-next and
noted that it was already done by Jingoo Han.

Regards.
Geyslan


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