mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Conrad Meyer <cemeyer@uw.edu>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Forest Bond <forest@alittletooquiet.net>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Conrad Meyer <cse.cem@gmail.com>
Subject: [PATCH] Staging: vt6655: Fix sparse-indicated type mismatch to kmalloc
Date: Thu, 20 Mar 2014 17:42:09 -0700	[thread overview]
Message-ID: <1395362529-17182-1-git-send-email-cse.cem@gmail.com> (raw)

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


             reply	other threads:[~2014-03-21  0:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-21  0:42 Conrad Meyer [this message]
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-10 20:16       ` 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-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-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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1395362529-17182-1-git-send-email-cse.cem@gmail.com \
    --to=cemeyer@uw.edu \
    --cc=cse.cem@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=forest@alittletooquiet.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome