All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drivers/staging/vt6655/iwctl.c fix a sparse warning
@ 2014-04-03 16:32 Jimmy Li
  2014-04-03 17:42 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Jimmy Li @ 2014-04-03 16:32 UTC (permalink / raw)
  To: Dan Carpenter, Joe Perches, Greg Kroah-Hartman, Teodora Baluta,
	Peter P Waskiewicz Jr, Michael Gunselmann, Lisa Nguyen,
	Martin Hofmann, Malcolm Priestley, =?utf-8?B?VMO8bGluIMSwemVy?=,
	Archana kumari
  Cc: devel, linux-kernel

Signed-off-by: Jimmy Li <coder.liss@gmail.com>
---
v2: additional cleanups as well.
 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


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

* Re: [PATCH v2] drivers/staging/vt6655/iwctl.c fix a sparse warning
  2014-04-03 16:32 [PATCH v2] drivers/staging/vt6655/iwctl.c fix a sparse warning Jimmy Li
@ 2014-04-03 17:42 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2014-04-03 17:42 UTC (permalink / raw)
  To: Jimmy Li
  Cc: Joe Perches, Greg Kroah-Hartman, Teodora Baluta,
	Peter P Waskiewicz Jr, Michael Gunselmann, Lisa Nguyen,
	Martin Hofmann, Malcolm Priestley, =?utf-8?B?VMO8bGluIMSwemVy?=,
	Archana kumari, devel, linux-kernel

On Fri, Apr 04, 2014 at 12:32:29AM +0800, Jimmy Li wrote:
> Signed-off-by: Jimmy Li <coder.liss@gmail.com>

You dropped the commit message which said which sparse warnings were
fixed.  It should say something about the other cleanups as well. Also
the subject prefix isn't right.  Use:

[PATCH v3] Staging: vt6655: iwctl.c: fix a sparse warning

Or something.  "drivers/" doesn't add any information.

regards,
dan carpenter


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

end of thread, other threads:[~2014-04-03 17:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-03 16:32 [PATCH v2] drivers/staging/vt6655/iwctl.c fix a sparse warning Jimmy Li
2014-04-03 17:42 ` Dan Carpenter

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.