[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1362080817-2098-1-git-send-email-linux@roeck-us.net>
Date: Thu, 28 Feb 2013 11:46:57 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: devel@...verdev.osuosl.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, Guenter Roeck <linux@...ck-us.net>
Subject: [PATCH] staging: dgrp: Drop unnecessary typecast
An unnecessary typecast in dgrp_net_ops.c causes the following build error
if compiled with W=1.
In function ‘copy_from_user’, inlined from ‘dgrp_net_ioctl’ at
drivers/staging/dgrp/dgrp_net_ops.c:3408:21:
arch/x86/include/asm/uaccess_32.h:211:26: error: call to
‘copy_from_user_overflow’ declared with attribute error: copy_from_user()
buffer size is not provably correct
Signed-off-by: Guenter Roeck <linux@...ck-us.net>
---
drivers/staging/dgrp/dgrp_net_ops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/dgrp/dgrp_net_ops.c b/drivers/staging/dgrp/dgrp_net_ops.c
index e6018823..f364e8e 100644
--- a/drivers/staging/dgrp/dgrp_net_ops.c
+++ b/drivers/staging/dgrp/dgrp_net_ops.c
@@ -3405,7 +3405,7 @@ static long dgrp_net_ioctl(struct file *file, unsigned int cmd,
if (size != sizeof(struct link_struct))
return -EINVAL;
- if (copy_from_user((void *)(&link), (void __user *) arg, size))
+ if (copy_from_user(&link, (void __user *)arg, size))
return -EFAULT;
if (link.lk_fast_rate < 9600)
--
1.7.9.7
--
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