lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 17 Oct 2013 07:14:22 -0300
From:	Geyslan Gregório Bem <geyslan@...il.com>
To:	Lidza Louina <lidza.louina@...il.com>
Cc:	Greg KH <gregkh@...uxfoundation.org>,
	driverdev-devel@...uxdriverproject.org, devel@...verdev.osuosl.org,
	LKML <linux-kernel@...r.kernel.org>,
	kernel-br <kernel-br@...glegroups.com>,
	"Geyslan G. Bem" <geyslan@...il.com>
Subject: Re: [PATCH] drivers: staging: dgap: Remove useless casting in dgap_parse.c

2013/10/16 Geyslan G. Bem <geyslan@...il.com>:
> Casting (void *) value returned by kmalloc is useless
> as mentioned in Documentation/CodingStyle, Chap 14.
>
> Signed-off-by: Geyslan G. Bem <geyslan@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ