public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: vt6655: Fix sparse-indicated type mismatch to kmalloc
@ 2014-03-21  0:42 Conrad Meyer
  2014-03-25 20:30 ` [WIP] [PATCH 0/3] remove wrong cast of gfp_t flags silvio
  0 siblings, 1 reply; 15+ messages in thread
From: Conrad Meyer @ 2014-03-21  0:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Forest Bond, devel, linux-kernel, Conrad Meyer

Signed-off-by: Conrad Meyer <cse.cem@gmail.com>
---
Patch is against next-20140320. Fixes a minor sparse warning in the staging
driver vt6655. p->length is u16; implicit cast to size_t is fine. No reason to
cast GFP_KERNEL...
---
 drivers/staging/vt6655/wpactl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vt6655/wpactl.c b/drivers/staging/vt6655/wpactl.c
index d17224f..c27ed5d 100644
--- a/drivers/staging/vt6655/wpactl.c
+++ b/drivers/staging/vt6655/wpactl.c
@@ -855,11 +855,11 @@ int wpa_ioctl(PSDevice pDevice, struct iw_point *p)
 
 	if (p->length < sizeof(struct viawget_wpa_param) ||
 	    p->length > VIAWGET_WPA_MAX_BUF_SIZE || !p->pointer)
 		return -EINVAL;
 
-	param = kmalloc((int)p->length, (int)GFP_KERNEL);
+	param = kmalloc(p->length, GFP_KERNEL);
 	if (param == NULL)
 		return -ENOMEM;
 
 	if (copy_from_user(param, p->pointer, p->length)) {
 		ret = -EFAULT;
-- 
1.8.5.3


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-04-12  0:31 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-21  0:42 [PATCH] Staging: vt6655: Fix sparse-indicated type mismatch to kmalloc Conrad Meyer
2014-03-25 20:30 ` [WIP] [PATCH 0/3] remove wrong cast of gfp_t flags silvio
2014-03-25 20:30   ` [PATCH 1/3] staging: vt6655: removed incorrect casting in wpactl.c silvio
2014-04-03  9:43     ` Dan Carpenter
2014-04-04 22:32       ` [WIP] [PATCH v2 0/3] remove wrong cast of gfp_t flags Silvio Fricke
2014-04-04 22:32         ` [WIP] [PATCH v2 1/3] staging: vt6655: removed incorrect casting in wpactl.c Silvio Fricke
2014-04-04 22:32         ` [WIP] [PATCH v2 2/3] staging: vt6655: removed incorrect casting in ioctl.c Silvio Fricke
2014-04-04 22:32         ` [WIP] [PATCH v2 3/3] staging: vt6655: removed incorrect casting in iwctl.c Silvio Fricke
2014-04-10 20:16         ` [WIP] [PATCH v2 0/3] remove wrong cast of gfp_t flags Greg KH
2014-04-12  0:30           ` [PATCH v3 " Silvio Fricke
2014-04-12  0:30             ` [PATCH v3 1/3] staging: vt6655: removed incorrect casting in wpactl.c Silvio Fricke
2014-04-12  0:30             ` [PATCH v3 2/3] staging: vt6655: removed incorrect casting in ioctl.c Silvio Fricke
2014-04-12  0:30             ` [PATCH v3 3/3] staging: vt6655: removed incorrect casting in iwctl.c Silvio Fricke
2014-03-25 20:30   ` [PATCH 2/3] staging: vt6655: removed incorrect casting in ioctl.c silvio
2014-03-25 20:30   ` [PATCH 3/3] staging: vt6655: removed incorrect casting in iwctl.c silvio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox