From: David Kimdon <david.kimdon@devicescape.com>
To: Jiri Benc <jbenc@suse.cz>
Cc: David Kimdon <david.kimdon@devicescape.com>,
netdev@vger.kernel.org,
"John W. Linville" <linville@tuxdriver.com>
Subject: Re: [patch 3/3] d80211: silence sparse warning: bad constant expression
Date: Wed, 18 Oct 2006 08:12:27 -0700 [thread overview]
Message-ID: <20061018151227.GA9777@devicescape.com> (raw)
In-Reply-To: <20061018155607.2320a5fa@griffin.suse.cz>
On Wed, Oct 18, 2006 at 03:56:07PM +0200, Jiri Benc wrote:
> On Mon, 9 Oct 2006 13:11:02 -0700, David Kimdon wrote:
> > --- wireless-dev.orig/net/d80211/ieee80211_sta.c
> > +++ wireless-dev/net/d80211/ieee80211_sta.c
> > @@ -930,8 +930,8 @@ static void ieee80211_rx_mgmt_auth(struc
> > printk(KERN_DEBUG "%s: AP denied authentication (auth_alg=%d "
> > "code=%d)\n", dev->name, ifsta->auth_alg, status_code);
> > if (status_code == WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG) {
> > - const int num_algs = 3;
> > - u8 algs[num_algs];
> > + u8 algs[3];
> > + const int num_algs = ARRAY_SIZE(algs);
>
> Wouldn't it be better just to use ARRAY_SIZE(algs) and get rid of
> num_algs completely?
I actually think the code reads slightly cleaner using num_algs, but
don't have a strong preference. I'd be happy to make the change if
removing num_algs is preferred.
-David
next prev parent reply other threads:[~2006-10-18 15:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20061009170159.804032000@devicescape.com>
2006-10-09 17:02 ` [patch 1/3] d80211: use FCS_LEN instead of hardcoded number David Kimdon
2006-10-09 17:03 ` [patch 2/3] d80211: remove poorly documented ieee80211_hw extra_hdr_room flag David Kimdon
2006-10-10 10:00 ` Michael Buesch
2006-10-10 13:45 ` David Kimdon
2006-10-10 14:30 ` Michael Wu
2006-10-10 21:04 ` Michael Buesch
2006-10-11 0:37 ` David Kimdon
2006-10-09 17:03 ` [patch 3/3] d80211: silence sparse warning: bad constant expression David Kimdon
2006-10-09 20:11 ` David Kimdon
2006-10-18 13:56 ` Jiri Benc
2006-10-18 15:12 ` David Kimdon [this message]
2006-10-18 15:40 ` Jiri Benc
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=20061018151227.GA9777@devicescape.com \
--to=david.kimdon@devicescape.com \
--cc=jbenc@suse.cz \
--cc=linville@tuxdriver.com \
--cc=netdev@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 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.