[OPW,kernel,v3] staging: vt6655:removed incorrect casting in hostap.c
diff mbox

Message ID 1382038315-14417-1-git-send-email-archanakumari959@gmail.com
State Accepted
Headers show

Commit Message

Archana kumari Oct. 17, 2013, 7:31 p.m. UTC
This patch fixes the following type of sparse warnings:

drivers/staging/vt6655/hostap.c:733:42: warning: cast from restricted gfp_t
drivers/staging/vt6655/hostap.c:733:42: warning: incorrect type in argument 2 (different base types)
drivers/staging/vt6655/hostap.c:733:42:    expected restricted gfp_t [usertype] flags
drivers/staging/vt6655/hostap.c:733:42:    got int [signed] <noident>

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
---
 drivers/staging/vt6655/hostap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Josh Triplett Oct. 17, 2013, 8:20 p.m. UTC | #1
On Fri, Oct 18, 2013 at 01:01:55AM +0530, Archana kumari wrote:
> This patch fixes the following type of sparse warnings:
> 
> drivers/staging/vt6655/hostap.c:733:42: warning: cast from restricted gfp_t
> drivers/staging/vt6655/hostap.c:733:42: warning: incorrect type in argument 2 (different base types)
> drivers/staging/vt6655/hostap.c:733:42:    expected restricted gfp_t [usertype] flags
> drivers/staging/vt6655/hostap.c:733:42:    got int [signed] <noident>
> 
> Signed-off-by: Archana kumari <archanakumari959@gmail.com>

Reviewed-by: Josh Triplett <josh@joshtriplett.org>

> ---
>  drivers/staging/vt6655/hostap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c
> index fdd63b6..aab0012 100644
> --- a/drivers/staging/vt6655/hostap.c
> +++ b/drivers/staging/vt6655/hostap.c
> @@ -730,7 +730,7 @@ int vt6655_hostap_ioctl(PSDevice pDevice, struct iw_point *p)
>  	    p->length > VIAWGET_HOSTAPD_MAX_BUF_SIZE || !p->pointer)
>  		return -EINVAL;
>  
> -	param = kmalloc((int)p->length, (int)GFP_KERNEL);
> +	param = kmalloc((int)p->length, GFP_KERNEL);
>  	if (param == NULL)
>  		return -ENOMEM;
>  
> -- 
> 1.8.1.2
> 
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
Greg KH Oct. 17, 2013, 8:34 p.m. UTC | #2
On Fri, Oct 18, 2013 at 01:01:55AM +0530, Archana kumari wrote:
> This patch fixes the following type of sparse warnings:
> 
> drivers/staging/vt6655/hostap.c:733:42: warning: cast from restricted gfp_t
> drivers/staging/vt6655/hostap.c:733:42: warning: incorrect type in argument 2 (different base types)
> drivers/staging/vt6655/hostap.c:733:42:    expected restricted gfp_t [usertype] flags
> drivers/staging/vt6655/hostap.c:733:42:    got int [signed] <noident>
> 
> Signed-off-by: Archana kumari <archanakumari959@gmail.com>

Applied, thanks.

greg k-h

Patch
diff mbox

diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c
index fdd63b6..aab0012 100644
--- a/drivers/staging/vt6655/hostap.c
+++ b/drivers/staging/vt6655/hostap.c
@@ -730,7 +730,7 @@  int vt6655_hostap_ioctl(PSDevice pDevice, struct iw_point *p)
 	    p->length > VIAWGET_HOSTAPD_MAX_BUF_SIZE || !p->pointer)
 		return -EINVAL;
 
-	param = kmalloc((int)p->length, (int)GFP_KERNEL);
+	param = kmalloc((int)p->length, GFP_KERNEL);
 	if (param == NULL)
 		return -ENOMEM;