From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1034440AbdD1A41 (ORCPT ); Thu, 27 Apr 2017 20:56:27 -0400 Received: from mx2.suse.de ([195.135.220.15]:54821 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1033720AbdD1A4S (ORCPT ); Thu, 27 Apr 2017 20:56:18 -0400 Date: Fri, 28 Apr 2017 02:56:15 +0200 From: "Luis R. Rodriguez" To: Luca Coelho Cc: "Luis R. Rodriguez" , gregkh@linuxfoundation.org, wagi@monom.org, dwmw2@infradead.org, rafal@milecki.pl, arend.vanspriel@broadcom.com, rjw@rjwysocki.net, yi1.li@linux.intel.com, atull@opensource.altera.com, moritz.fischer@ettus.com, pmladek@suse.com, johannes.berg@intel.com, emmanuel.grumbach@intel.com, kvalo@codeaurora.org, luto@kernel.org, takahiro.akashi@linaro.org, dhowells@redhat.com, pjones@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 4/5] iwlwifi: convert to use driver data API Message-ID: <20170428005615.GN28800@wotan.suse.de> References: <20170330032514.17173-1-mcgrof@kernel.org> <20170330032514.17173-5-mcgrof@kernel.org> <1491830352.31980.52.camel@coelho.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1491830352.31980.52.camel@coelho.fi> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 10, 2017 at 04:19:12PM +0300, Luca Coelho wrote: > On Wed, 2017-03-29 at 20:25 -0700, Luis R. Rodriguez wrote: > > The driver data API provides support for looking for firmware > > from a specific set of API ranges, so just use that. Since we > > free the firmware on the callback immediately after consuming it, > > this also takes avantage of that feature. > > > > Signed-off-by: Luis R. Rodriguez > > --- > > Looks fine, with one nitpick. > > > > drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 67 ++++++++++------------------ > > 1 file changed, 23 insertions(+), 44 deletions(-) > > > > diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c > > index be466a074c1d..b6643aa5b344 100644 > > --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c > > +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c > > [...] > > > @@ -1541,11 +1522,9 @@ struct iwl_drv *iwl_drv_start(struct iwl_trans *trans) > > } > > #endif > > > > - ret = iwl_request_firmware(drv, true); > > - if (ret) { > > - IWL_ERR(trans, "Couldn't request the fw\n"); > > + ret = iwl_request_firmware(drv); > > + if (ret) > > goto err_fw; > > - } > > Why remove the error message here? The driver data API now has enough semantics even for async requests so that an error is either always issued or supressed (optional is true), driver errors then are superfluous on error now. Let me know if this is OK. Luis