All of lore.kernel.org
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Michael Buesch <mb@bu3sch.de>,
	Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH] b43: Eliminate compilation warning in b43_op_set_key
Date: Wed, 14 Jan 2009 08:34:18 -0500	[thread overview]
Message-ID: <20090114133417.GB18634@tuxdriver.com> (raw)
In-Reply-To: <496d2fc9.UiHMYJR2melvWyoO%Larry.Finger@lwfinger.net>

On Tue, Jan 13, 2009 at 06:20:25PM -0600, Larry Finger wrote:
> A recent pull from wireless testing generates the following warning:
> =20
>    CC [M]  drivers/net/wireless/b43/main.o
>  drivers/net/wireless/b43/main.c: In function =E2=80=98b43_op_set_key=
=E2=80=99:
>  drivers/net/wireless/b43/main.c:3636: warning: pointer type mismatch
>  in conditional expression
>=20
> This fix was suggested by Johannes Berg <johannes@sipsolutions.net>.
>=20
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
>=20
> Index: wireless-testing/drivers/net/wireless/b43/main.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- wireless-testing.orig/drivers/net/wireless/b43/main.c
> +++ wireless-testing/drivers/net/wireless/b43/main.c
> @@ -3630,10 +3630,12 @@ static int b43_op_set_key(struct ieee802
> =20
>  out_unlock:
>  	if (!err) {
> +		u8 bcast[ETH_ALEN];
> +		memset(bcast, 0xff, ETH_ALEN);

Isn't there a statically-allocated array w/ the broadcast MAC in it
somewhere already?

>  		b43dbg(wl, "%s hardware based encryption for keyidx: %d, "
>  		       "mac: %pM\n",
>  		       cmd =3D=3D SET_KEY ? "Using" : "Disabling", key->keyidx,
> -		       sta ? sta->addr : "<group key>");
> +		       sta ? sta->addr : bcast);
>  		b43_dump_keymemory(dev);
>  	}
>  	write_unlock(&wl->tx_lock);
>=20

--=20
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-01-14 13:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-14  0:20 [PATCH] b43: Eliminate compilation warning in b43_op_set_key Larry Finger
2009-01-14 13:34 ` John W. Linville [this message]
2009-01-14 15:47   ` Larry Finger
2009-01-14 16:57     ` Michael Buesch

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=20090114133417.GB18634@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mb@bu3sch.de \
    /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.