From: Jiri Benc <jbenc@suse.cz>
To: David Kimdon <david.kimdon@devicescape.com>
Cc: 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 15:56:07 +0200 [thread overview]
Message-ID: <20061018155607.2320a5fa@griffin.suse.cz> (raw)
In-Reply-To: <20061009201102.GA10661@devicescape.com>
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?
Thanks,
Jiri
--
Jiri Benc
SUSE Labs
next prev parent reply other threads:[~2006-10-18 13:56 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 [this message]
2006-10-18 15:12 ` David Kimdon
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=20061018155607.2320a5fa@griffin.suse.cz \
--to=jbenc@suse.cz \
--cc=david.kimdon@devicescape.com \
--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 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).