From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752988AbdEILdE (ORCPT ); Tue, 9 May 2017 07:33:04 -0400 Received: from wolverine02.qualcomm.com ([199.106.114.251]:21373 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751360AbdEILdC (ORCPT ); Tue, 9 May 2017 07:33:02 -0400 X-IronPort-AV: E=Sophos;i="5.38,314,1491289200"; d="scan'208";a="380185823" X-IronPort-AV: E=McAfee;i="5800,7501,8522"; a="1344863217" X-MGA-submission: =?us-ascii?q?MDHlAtFiAb7J90jYSMhJJtLeSz0tgo1JINGrUC?= =?us-ascii?q?lEyQwGI/pytExdKdB0ZwnuT72QSmfLB2CFVRw6/LQKvSrufCGx2MGYt7?= =?us-ascii?q?Zn6YVGniAkRdS3xBYlPv1HcnQPEEYtnx9aJ9Zr0xqnnHEU2LTP6BbKth?= =?us-ascii?q?LH?= From: Kalle Valo To: "Gustavo A. R. Silva" CC: ath9k-devel , "linux-wireless@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] net: wireless: ath: ath9k: remove unnecessary code Thread-Topic: [PATCH] net: wireless: ath: ath9k: remove unnecessary code Thread-Index: AQHSyHca8LfpVclLgkmaLIIkjaadyA== Date: Tue, 9 May 2017 11:32:58 +0000 Message-ID: <87efvy1d07.fsf@kamboji.qca.qualcomm.com> References: <20170509034814.GA18034@embeddedgus> In-Reply-To: <20170509034814.GA18034@embeddedgus> (Gustavo A. R. Silva's message of "Mon, 8 May 2017 22:48:14 -0500") Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.251.52.12] Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v49BXDve022547 "Gustavo A. R. Silva" writes: > The name of an array used by itself will always return the array's address. > So this test will always evaluate as true. > > Addresses-Coverity-ID: 1364903 > Signed-off-by: Gustavo A. R. Silva > --- > drivers/net/wireless/ath/ath9k/eeprom.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c > index fb80ec8..5c3bc28 100644 > --- a/drivers/net/wireless/ath/ath9k/eeprom.c > +++ b/drivers/net/wireless/ath/ath9k/eeprom.c > @@ -143,7 +143,7 @@ bool ath9k_hw_nvram_read(struct ath_hw *ah, u32 off, u16 *data) > > if (ah->eeprom_blob) > ret = ath9k_hw_nvram_read_firmware(ah->eeprom_blob, off, data); > - else if (pdata && !pdata->use_eeprom && pdata->eeprom_data) > + else if (pdata && !pdata->use_eeprom) > ret = ath9k_hw_nvram_read_pdata(pdata, off, data); > else > ret = common->bus_ops->eeprom_read(common, off, data); The patch may very well be valid (didn't check yet) but the commit log is gibberish for me. -- Kalle Valo