From: Jimmy Li <coder.liss@gmail.com>
To: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Teodora Baluta" <teobaluta@gmail.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>,
"Tülin İzer" <tulinizer@gmail.com>,
"Archana kumari" <archanakumari959@gmail.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers/staging/vt6655/iwctl.c fix a sparse warning
Date: Thu, 27 Mar 2014 20:28:44 -0700 [thread overview]
Message-ID: <20140328032844.GC2263@gmail.com> (raw)
In-Reply-To: <20140326074243.GA15228@gmail.com>
On Wed, Mar 26, 2014 at 12:42:43AM -0700, Jimmy Li wrote:
> fix a sparse warning.
> drivers/staging/vt6655/iwctl.c:1846:35: warning: cast from restricted
> gfp_t
> drivers/staging/vt6655/iwctl.c:1846:35: warning: incorrect type in
> argument 2 (different base types)
> drivers/staging/vt6655/iwctl.c:1846:35: expected restricted gfp_t
> [usertype] flags
> drivers/staging/vt6655/iwctl.c:1846:35: got int [signed] <noident>
>
> Signed-off-by: Jimmy Li <coder.liss@gmail.com>
> ---
> drivers/staging/vt6655/iwctl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c
> index ac3fc16..5e25535 100644
> --- a/drivers/staging/vt6655/iwctl.c
> +++ b/drivers/staging/vt6655/iwctl.c
> @@ -1843,7 +1843,7 @@ int iwctl_siwencodeext(struct net_device *dev,
> PRINT_K("SIOCSIWENCODEEXT...... \n");
>
> blen = sizeof(*param);
> - buf = kmalloc((int)blen, (int)GFP_KERNEL);
> + buf = kmalloc((int)blen, GFP_KERNEL);
> if (buf == NULL)
> return -ENOMEM;
> memset(buf, 0, blen);
> --
> 1.7.10.4
>
You are right, I found that variable buf also don't make sense here,
maybe this could be more clear.
param = kzalloc(sizeof(struct viawget_wpa_param), GFP_KERNEL);
if (param == NULL)
return -ENOMEM;
removing two unnecessary variable, buf and blen.
In this situation, I should send a new patch v2 for it base on the
previous path? or send a new patch include all changes?
next prev parent reply other threads:[~2014-03-28 3:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-26 7:42 [PATCH] drivers/staging/vt6655/iwctl.c fix a sparse warning Jimmy Li
2014-03-26 12:10 ` Greg Kroah-Hartman
2014-03-26 15:16 ` Joe Perches
2014-03-28 3:28 ` Jimmy Li [this message]
2014-04-03 9:04 ` 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=20140328032844.GC2263@gmail.com \
--to=coder.liss@gmail.com \
--cc=archanakumari959@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox