Return-path: Received: from an-out-0708.google.com ([209.85.132.251]:59376 "EHLO an-out-0708.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755480AbYGUWjK (ORCPT ); Mon, 21 Jul 2008 18:39:10 -0400 Received: by an-out-0708.google.com with SMTP id d40so402483and.103 for ; Mon, 21 Jul 2008 15:39:09 -0700 (PDT) Message-ID: <43e72e890807211539p358fa0cbw2c9868ed8f9c9b4e@mail.gmail.com> (sfid-20080722_003915_545319_5608313E) Date: Mon, 21 Jul 2008 15:39:09 -0700 From: "Luis R. Rodriguez" To: "Luis Rodriguez" Subject: Re: [PATCH] ath9k: fix build errors and warnings on 64-bit systems Cc: "Pavel Roskin" , "ath9k-devel@lists.ath9k.org" , "linux-wireless@vger.kernel.org" In-Reply-To: <15B47C78534E094AA9A41F58FB8D74F3D6EF4A7EEE@SC1EXMB-MBCL.global.atheros.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 References: <20080721000313.24845.10866.stgit@dv.roinet.com> <15B47C78534E094AA9A41F58FB8D74F3D6EF4A7EEE@SC1EXMB-MBCL.global.atheros.com> Sender: linux-wireless-owner@vger.kernel.org List-ID: > 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. Luis