Search Linux Wireless

Re: [PATCH] ath9k: fix build errors and warnings on 64-bit systems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 21, 2008 at 3:44 PM, Pavel Roskin <proski@xxxxxxx> wrote:
> 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.

We'll need to get you hardware then :)

 Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux