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>] [day] [month] [year] [list]
Message-ID: <531870AD.1080403@compro.net>
Date:	Thu, 06 Mar 2014 07:57:17 -0500
From:	Mark Hounschell <markh@...pro.net>
To:	Daeseok Youn <daeseok.youn@...il.com>, lidza.louina@...il.com,
	gregkh@...uxfoundation.org
CC:	driverdev-devel@...uxdriverproject.org, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: dgap: remove useless cast on kzalloc()

On 03/06/2014 01:17 AM, Daeseok Youn wrote:
>
> coccinelle warning:
> drivers/staging/dgap/dgap.c:782:3-7: WARNING:
>   casting value returned by k[cmz]alloc to (char *) is useless.
> drivers/staging/dgap/dgap.c:776:2-16: WARNING:
>   casting value returned by k[cmz]alloc to (struct board_t *) is useless.
>
> Signed-off-by: Daeseok Youn <daeseok.youn@...il.com>
> ---
>   drivers/staging/dgap/dgap.c |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
> index cbce457..1adcd13 100644
> --- a/drivers/staging/dgap/dgap.c
> +++ b/drivers/staging/dgap/dgap.c
> @@ -773,13 +773,13 @@ static int dgap_found_board(struct pci_dev *pdev, int id)
>
>   	/* get the board structure and prep it */
>   	brd = dgap_Board[dgap_NumBoards] =
> -	(struct board_t *) kzalloc(sizeof(struct board_t), GFP_KERNEL);
> +		kzalloc(sizeof(struct board_t), GFP_KERNEL);
>   	if (!brd)
>   		return -ENOMEM;
>
>   	/* make a temporary message buffer for the boot messages */
>   	brd->msgbuf = brd->msgbuf_head =
> -		(char *) kzalloc(sizeof(char) * 8192, GFP_KERNEL);
> +		kzalloc(sizeof(char) * 8192, GFP_KERNEL);
>   	if (!brd->msgbuf) {
>   		kfree(brd);
>   		return -ENOMEM;
>

I'm pretty sure this has already been fixed up in current staging-next.

Thanks
Mark
--
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