Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1632468 > unrolled thread

Re: [PATCH v6 4/5] iwlwifi: convert to use driver data API

Started by"Luis R. Rodriguez" <mcgrof@kernel.org>
First post2017-04-28 03:00 +0200
Last post2017-04-28 14:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v6 4/5] iwlwifi: convert to use driver data API "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-04-28 03:00 +0200
    Re: [PATCH v6 4/5] iwlwifi: convert to use driver data API Luca Coelho <luca@coelho.fi> - 2017-04-28 14:30 +0200

#1632468 — Re: [PATCH v6 4/5] iwlwifi: convert to use driver data API

From"Luis R. Rodriguez" <mcgrof@kernel.org>
Date2017-04-28 03:00 +0200
SubjectRe: [PATCH v6 4/5] iwlwifi: convert to use driver data API
Message-ID<tB2qm-8uf-5@gated-at.bofh.it>
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 <mcgrof@kernel.org>
> > ---
> 
> 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

[toc] | [next] | [standalone]


#1632837

FromLuca Coelho <luca@coelho.fi>
Date2017-04-28 14:30 +0200
Message-ID<tBdc6-7bX-21@gated-at.bofh.it>
In reply to#1632468
On Fri, 2017-04-28 at 02:56 +0200, Luis R. Rodriguez wrote:
> 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 <mcgrof@kernel.org>
> > > ---
> > 
> > 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.

Yeah, that's okay.  We can always add something back if we think it's
needed.

--
Cheers,
Luca.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web