From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtprelay0139.hostedemail.com ([216.40.44.139]:56255 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750740AbbLTSrN (ORCPT ); Sun, 20 Dec 2015 13:47:13 -0500 Message-ID: <1450637228.3430.30.camel@perches.com> (sfid-20151220_194717_713714_0899263C) Subject: Re: [patch -next] ath9k: fix ath9k_hw_nvram_check_version() From: Joe Perches To: Dan Carpenter , QCA ath9k Development , Martin Blumenstingl Cc: Kalle Valo , linux-wireless@vger.kernel.org, ath9k-devel@venema.h4ckr.net, kernel-janitors@vger.kernel.org Date: Sun, 20 Dec 2015 10:47:08 -0800 In-Reply-To: <20151219105919.GB3749@mwanda> References: <20151219105919.GB3749@mwanda> Content-Type: text/plain; charset="ISO-8859-1" Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Sat, 2015-12-19 at 13:59 +0300, Dan Carpenter wrote: > There is a type bug so it always returns success. How many false positives do you have to sift through to find this sort of error? > +++ b/drivers/net/wireless/ath/ath9k/eeprom.c > @@ -206,7 +206,7 @@ bool ath9k_hw_nvram_check_version(struct ath_hw *ah, int version, int minrev) >   ath_err(common, "Bad EEPROM VER 0x%04x or REV 0x%04x\n", >   ah->eep_ops->get_eeprom_ver(ah), >   ah->eep_ops->get_eeprom_rev(ah)); > - return -EINVAL; > + return false; >   } >   >   return true; From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Perches Date: Sun, 20 Dec 2015 18:47:08 +0000 Subject: Re: [patch -next] ath9k: fix ath9k_hw_nvram_check_version() Message-Id: <1450637228.3430.30.camel@perches.com> List-Id: References: <20151219105919.GB3749@mwanda> In-Reply-To: <20151219105919.GB3749@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: Dan Carpenter , QCA ath9k Development , Martin Blumenstingl Cc: Kalle Valo , linux-wireless@vger.kernel.org, ath9k-devel@venema.h4ckr.net, kernel-janitors@vger.kernel.org On Sat, 2015-12-19 at 13:59 +0300, Dan Carpenter wrote: > There is a type bug so it always returns success. How many false positives do you have to sift through to find this sort of error? > +++ b/drivers/net/wireless/ath/ath9k/eeprom.c > @@ -206,7 +206,7 @@ bool ath9k_hw_nvram_check_version(struct ath_hw *ah, = int version, int minrev) > =A0 ath_err(common, "Bad EEPROM VER 0x%04x or REV 0x%04x\n", > =A0 ah->eep_ops->get_eeprom_ver(ah), > =A0 ah->eep_ops->get_eeprom_rev(ah)); > - return -EINVAL; > + return false; > =A0 } > =A0 > =A0 return true; -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Perches Date: Sun, 20 Dec 2015 10:47:08 -0800 Subject: [ath9k-devel] [patch -next] ath9k: fix ath9k_hw_nvram_check_version() In-Reply-To: <20151219105919.GB3749@mwanda> References: <20151219105919.GB3749@mwanda> Message-ID: <1450637228.3430.30.camel@perches.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org On Sat, 2015-12-19 at 13:59 +0300, Dan Carpenter wrote: > There is a type bug so it always returns success. How many false positives do you have to sift through to find this sort of error? > +++ b/drivers/net/wireless/ath/ath9k/eeprom.c > @@ -206,7 +206,7 @@ bool ath9k_hw_nvram_check_version(struct ath_hw *ah, int version, int minrev) > ? ath_err(common, "Bad EEPROM VER 0x%04x or REV 0x%04x\n", > ? ah->eep_ops->get_eeprom_ver(ah), > ? ah->eep_ops->get_eeprom_rev(ah)); > - return -EINVAL; > + return false; > ? } > ? > ? return true;