All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jimmy Li <coder.liss@gmail.com>
To: "Dan Carpenter" <dan.carpenter@oracle.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Teodora Baluta" <teobaluta@gmail.com>,
	"Joe Perches" <joe@perches.com>,
	"Peter P Waskiewicz Jr" <peter.p.waskiewicz.jr@intel.com>,
	"Michael Gunselmann" <michael.gunselmann@studium.uni-erlangen.de>,
	"Lisa Nguyen" <lisa@xenapiadmin.com>,
	"Martin Hofmann" <martin.hofmann@studium.uni-erlangen.de>,
	"Malcolm Priestley" <tvboxspy@gmail.com>,
	=?us-ascii?Q?=3D=3Futf-8=3FB=3FVMO8bGluIMSwemVy=3F=3D?=
	<tulinizer@gmail.com>,
	"Archana kumari" <archanakumari959@gmail.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3] Staging: vt6655: iwctl.c: fix a sparse warning
Date: Tue, 8 Apr 2014 19:09:27 +0800	[thread overview]
Message-ID: <20140408110927.GA17308@gmail.com> (raw)

thanks for correcting my patch format.

Signed-off-by: Jimmy Li <coder.liss@gmail.com>
---
v1 fix a sparse warning.
	(iwctl.c:1846:35: expected restricted gfp_t [usertype] flags)
v2 clear up two unnecessary variable, buf and blen.
v3 fix patch format.
 drivers/staging/vt6655/iwctl.c |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c
index ac3fc16..394031b 100644
--- a/drivers/staging/vt6655/iwctl.c
+++ b/drivers/staging/vt6655/iwctl.c
@@ -1835,19 +1835,14 @@ int iwctl_siwencodeext(struct net_device *dev,
 	size_t seq_len = 0, key_len = 0;
 //
 	// int ii;
-	u8 *buf;
-	size_t blen;
 	u8 key_array[64];
 	int ret = 0;
 
 	PRINT_K("SIOCSIWENCODEEXT...... \n");
 
-	blen = sizeof(*param);
-	buf = kmalloc((int)blen, (int)GFP_KERNEL);
-	if (buf == NULL)
+	param = kzalloc(sizeof(struct viawget_wpa_param), GFP_KERNEL);
+	if (param == NULL)
 		return -ENOMEM;
-	memset(buf, 0, blen);
-	param = (struct viawget_wpa_param *)buf;
 
 //recover alg_name
 	switch (ext->alg) {
-- 
1.7.9.5


             reply	other threads:[~2014-04-08 11:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-08 11:09 Jimmy Li [this message]
2014-04-08 11:19 ` [PATCH v3] Staging: vt6655: iwctl.c: fix a sparse warning Dan Carpenter
2014-04-08 12:45 ` [PATCH v4] " Joe Perches
2014-04-08 14:26 ` [PATCH v5] " Dan Carpenter

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=20140408110927.GA17308@gmail.com \
    --to=coder.liss@gmail.com \
    --cc=archanakumari959@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lisa@xenapiadmin.com \
    --cc=martin.hofmann@studium.uni-erlangen.de \
    --cc=michael.gunselmann@studium.uni-erlangen.de \
    --cc=peter.p.waskiewicz.jr@intel.com \
    --cc=teobaluta@gmail.com \
    --cc=tulinizer@gmail.com \
    --cc=tvboxspy@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.