From: Dan Carpenter <dan.carpenter@oracle.com>
To: Marcos Paulo de Souza <marcos.mage@gmail.com>
Cc: gregkh@suse.de, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] staging: vt6656: Remove useless function
Date: Tue, 20 Dec 2011 09:37:16 +0300 [thread overview]
Message-ID: <20111220063716.GH17353@mwanda> (raw)
In-Reply-To: <1324343247-28671-1-git-send-email-marcos.mage@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1157 bytes --]
On Tue, Dec 20, 2011 at 01:07:27AM +0000, Marcos Paulo de Souza wrote:
> /*
> * Wireless Handler : get protocol name
> */
> @@ -1936,7 +1921,6 @@ int iwctl_siwmlme(struct net_device *dev,
> /*
> static const iw_handler iwctl_handler[] =
> {
> - (iw_handler) iwctl_commit, // SIOCSIWCOMMIT
Nope. This doesn't work. It moves everything in the array to the
wrong position. It should be replaced with NULL or better yet, the
whole array should be rewritten with like:
static const iw_handler iwctl_handler[] = {
[SIOCGIWNAME] = (iw_handler) iwctl_giwname,
[SIOCGIWRANGE] = (iw_handler) iwctl_giwrange,
...
The NULLs could be left out then.
> (iw_handler) iwctl_giwname, // SIOCGIWNAME
> (iw_handler) NULL, // SIOCSIWNWID
> (iw_handler) NULL, // SIOCGIWNWID
> @@ -1998,7 +1982,7 @@ static const iw_handler iwctl_handler[] =
>
> static const iw_handler iwctl_handler[] =
> {
> - (iw_handler) iwctl_commit, // SIOCSIWCOMMIT
> + (iw_handler) 0, /* SIOCSIWCOMMIT */
This should be NULL not zero because it's a pointer. (Style issue,
not a bug).
regards,
dan carpenter
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2011-12-20 6:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-20 1:07 [PATCH 2/2] staging: vt6656: Remove useless function Marcos Paulo de Souza
2011-12-20 6:37 ` Dan Carpenter [this message]
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=20111220063716.GH17353@mwanda \
--to=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=marcos.mage@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;
as well as URLs for NNTP newsgroup(s).