From: Pavel Roskin <proski@gnu.org>
To: "Luis R. Rodriguez" <mcgrof@gmail.com>
Cc: "ath9k-devel@lists.ath9k.org" <ath9k-devel@lists.ath9k.org>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] ath9k: fix build errors and warnings on 64-bit systems
Date: Mon, 21 Jul 2008 18:44:39 -0400 [thread overview]
Message-ID: <1216680279.11291.45.camel@dv> (raw)
In-Reply-To: <43e72e890807211539p358fa0cbw2c9868ed8f9c9b4e@mail.gmail.com>
On Mon, 2008-07-21 at 15:39 -0700, Luis R. Rodriguez wrote:
> > diff --git a/ksrc/hw.c b/ksrc/hw.c
> > index b8a9321..5a24cbe 100644
> > --- a/ksrc/hw.c
> > +++ b/ksrc/hw.c
> > @@ -852,9 +852,11 @@ static inline enum hal_status ath9k_hw_check_eeprom(struct ath_hal *ah)
> > else
> > el = ahp->ah_eeprom.baseEepHeader.length;
> >
> > + if (el < sizeof(struct ar5416_eeprom) / sizeof(u_int16_t))
> > + el = sizeof(struct ar5416_eeprom) / sizeof(u_int16_t);
> > +
> > eepdata = (u_int16_t *) (&ahp->ah_eeprom);
> > - for (i = 0; i <
> > - min(el, sizeof(struct ar5416_eeprom)) / sizeof(u_int16_t); i++)
> > + for (i = 0; i < el; i++)
> > sum ^= *eepdata++;
> >
> > if (need_swap) {
>
> Its a good thing indeed I split this into two patches, as your first
> hunk breaks the check. Had you tested this??? Anyway I've fixed this
> now.
Sorry, I only compile tested it. Indeed, the first comparison should be
inverted, or we get maximum, not minimum. I didn't want to change the
code so much, but I wanted to avoid breaking the 80 character limit with
casts.
--
Regards,
Pavel Roskin
next prev parent reply other threads:[~2008-07-21 22:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080721000313.24845.10866.stgit@dv.roinet.com>
2008-07-21 13:53 ` [PATCH] ath9k: fix build errors and warnings on 64-bit systems Luis Rodriguez
2008-07-21 22:39 ` Luis R. Rodriguez
2008-07-21 22:44 ` Pavel Roskin [this message]
2008-07-21 22:52 ` Luis R. Rodriguez
2008-07-21 23:55 ` Pavel Roskin
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=1216680279.11291.45.camel@dv \
--to=proski@gnu.org \
--cc=ath9k-devel@lists.ath9k.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@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