From: Dan Williams <dcbw@redhat.com>
To: Holger Schurig <hs4233@mail.mn-solutions.de>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] libertas: fix u8 constant
Date: Mon, 08 Oct 2007 08:55:10 -0400 [thread overview]
Message-ID: <1191848110.2703.14.camel@localhost.localdomain> (raw)
In-Reply-To: <200710081107.27285.hs4233@mail.mn-solutions.de>
On Mon, 2007-10-08 at 11:07 +0200, Holger Schurig wrote:
> Don't write constants that are (per documentation and struct) u8
> as 0x0001, use 0x01 instead. Also remove an useless cast.
>
> Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-By: Dan Williams <dcbw@redhat.com>
>
> Index: libertas-2.6/drivers/net/wireless/libertas/host.h
> ===================================================================
> --- libertas-2.6.orig/drivers/net/wireless/libertas/host.h 2007-10-08 11:51:46.000000000 +0200
> +++ libertas-2.6/drivers/net/wireless/libertas/host.h 2007-10-08 11:52:10.000000000 +0200
> @@ -138,8 +138,8 @@
> #define CMD_ACT_REMOVE 0x0004
> #define CMD_ACT_USE_DEFAULT 0x0008
>
> -#define CMD_TYPE_WEP_40_BIT 0x0001
> -#define CMD_TYPE_WEP_104_BIT 0x0002
> +#define CMD_TYPE_WEP_40_BIT 0x01
> +#define CMD_TYPE_WEP_104_BIT 0x02
>
> #define CMD_NUM_OF_WEP_KEYS 4
>
> Index: libertas-2.6/drivers/net/wireless/libertas/cmd.c
> ===================================================================
> --- libertas-2.6.orig/drivers/net/wireless/libertas/cmd.c 2007-10-08 11:52:13.000000000 +0200
> +++ libertas-2.6/drivers/net/wireless/libertas/cmd.c 2007-10-08 11:52:36.000000000 +0200
> @@ -181,13 +181,13 @@ static int wlan_cmd_802_11_set_wep(wlan_
>
> switch (pkey->len) {
> case KEY_LEN_WEP_40:
> - wep->keytype[i] = (u8)CMD_TYPE_WEP_40_BIT;
> + wep->keytype[i] = CMD_TYPE_WEP_40_BIT;
> memmove(&wep->keymaterial[i], pkey->key,
> pkey->len);
> lbs_deb_cmd("SET_WEP: add key %d (40 bit)\n", i);
> break;
> case KEY_LEN_WEP_104:
> - wep->keytype[i] = (u8)CMD_TYPE_WEP_104_BIT;
> + wep->keytype[i] = CMD_TYPE_WEP_104_BIT;
> memmove(&wep->keymaterial[i], pkey->key,
> pkey->len);
> lbs_deb_cmd("SET_WEP: add key %d (104 bit)\n", i);
prev parent reply other threads:[~2007-10-08 12:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-07 10:15 libertas and endianness Geert Uytterhoeven
2007-10-08 9:06 ` Holger Schurig
2007-10-08 12:55 ` Dan Williams
2007-10-08 9:07 ` [PATCH] libertas: fix u8 constant Holger Schurig
2007-10-08 12:55 ` Dan Williams [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=1191848110.2703.14.camel@localhost.localdomain \
--to=dcbw@redhat.com \
--cc=hs4233@mail.mn-solutions.de \
--cc=linux-wireless@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).