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


Groups > linux.kernel > #1314689 > unrolled thread

Re: [PATCH v3 3/5] firmware: fold successful fw read early

Started by"Luis R. Rodriguez" <mcgrof@suse.com>
First post2016-01-22 02:50 +0100
Last post2016-01-22 21:00 +0100
Articles 3 — 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 v3 3/5] firmware: fold successful fw read early "Luis R. Rodriguez" <mcgrof@suse.com> - 2016-01-22 02:50 +0100
    Re: [PATCH v3 3/5] firmware: fold successful fw read early Mimi Zohar <zohar@linux.vnet.ibm.com> - 2016-01-22 13:00 +0100
      Re: [PATCH v3 3/5] firmware: fold successful fw read early "Luis R. Rodriguez" <mcgrof@suse.com> - 2016-01-22 21:00 +0100

#1314689 — Re: [PATCH v3 3/5] firmware: fold successful fw read early

From"Luis R. Rodriguez" <mcgrof@suse.com>
Date2016-01-22 02:50 +0100
SubjectRe: [PATCH v3 3/5] firmware: fold successful fw read early
Message-ID<qTz1n-5gH-1@gated-at.bofh.it>
On Mon, Jan 04, 2016 at 03:48:29PM -0500, Josh Boyer wrote:
> On Wed, Dec 23, 2015 at 4:34 PM, Luis R. Rodriguez
> <mcgrof@do-not-panic.com> wrote:
> > From: David Howells <dhowells@redhat.com>
> >
> > We'll be folding in some more checks on fw_read_file_contents(),
> > this will make the success case easier to follow.
> >
> > Signed-off-by: David Howells <dhowells@redhat.com>
> > Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
> 
> Reviewed-by: Josh Boyer <jwboyer@fedoraproject.org>

Thanks Josh.

Mimi, this is the other patch that  I was referring to.

  Luis
> 
> > ---
> >  drivers/base/firmware_class.c | 16 +++++++---------
> >  1 file changed, 7 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
> > index d8148aa89b01..e10a5349aa61 100644
> > --- a/drivers/base/firmware_class.c
> > +++ b/drivers/base/firmware_class.c
> > @@ -361,20 +361,18 @@ static int fw_get_filesystem_firmware(struct device *device,
> >                         continue;
> >                 rc = fw_read_file_contents(file, buf);
> >                 fput(file);
> > -               if (rc)
> > +               if (rc == 0) {
> > +                       dev_dbg(device, "system data: direct-loading firmware %s\n",
> > +                               buf->fw_id);
> > +                       fw_finish_direct_load(device, buf);
> > +                       goto out;
> > +               } else
> >                         dev_warn(device, "system data, attempted to load %s, but failed with error %d\n",
> >                                  path, rc);
> > -               else
> > -                       break;
> >         }
> > +out:
> >         __putname(path);
> >
> > -       if (!rc) {
> > -               dev_dbg(device, "system data: direct-loading firmware %s\n",
> > -                       buf->fw_id);
> > -               fw_finish_direct_load(device, buf);
> > -       }
> > -
> >         return rc;
> >  }
> >
> > --
> > 2.6.2
> >
> 

-- 
Luis Rodriguez, SUSE LINUX GmbH
Maxfeldstrasse 5; D-90409 Nuernberg

[toc] | [next] | [standalone]


#1314927

FromMimi Zohar <zohar@linux.vnet.ibm.com>
Date2016-01-22 13:00 +0100
Message-ID<qTIxH-3xw-5@gated-at.bofh.it>
In reply to#1314689
On Fri, 2016-01-22 at 02:45 +0100, Luis R. Rodriguez wrote:
> On Mon, Jan 04, 2016 at 03:48:29PM -0500, Josh Boyer wrote:
> > On Wed, Dec 23, 2015 at 4:34 PM, Luis R. Rodriguez
> > <mcgrof@do-not-panic.com> wrote:
> > > From: David Howells <dhowells@redhat.com>
> > >
> > > We'll be folding in some more checks on fw_read_file_contents(),
> > > this will make the success case easier to follow.
> > >
> > > Signed-off-by: David Howells <dhowells@redhat.com>
> > > Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
> > 
> > Reviewed-by: Josh Boyer <jwboyer@fedoraproject.org>
> 
> Thanks Josh.
> 
> Mimi, this is the other patch that  I was referring to.

After this patch set, replacing the fw_read_file calls with the
kernel_read_file_from_path() version is straight forward.  Nice!

Mimi

[toc] | [prev] | [next] | [standalone]


#1315245

From"Luis R. Rodriguez" <mcgrof@suse.com>
Date2016-01-22 21:00 +0100
Message-ID<qTQ2f-cO-13@gated-at.bofh.it>
In reply to#1314927
On Fri, Jan 22, 2016 at 3:56 AM, Mimi Zohar <zohar@linux.vnet.ibm.com> wrote:
> On Fri, 2016-01-22 at 02:45 +0100, Luis R. Rodriguez wrote:
>> On Mon, Jan 04, 2016 at 03:48:29PM -0500, Josh Boyer wrote:
>> > On Wed, Dec 23, 2015 at 4:34 PM, Luis R. Rodriguez
>> > <mcgrof@do-not-panic.com> wrote:
>> > > From: David Howells <dhowells@redhat.com>
>> > >
>> > > We'll be folding in some more checks on fw_read_file_contents(),
>> > > this will make the success case easier to follow.
>> > >
>> > > Signed-off-by: David Howells <dhowells@redhat.com>
>> > > Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
>> >
>> > Reviewed-by: Josh Boyer <jwboyer@fedoraproject.org>
>>
>> Thanks Josh.
>>
>> Mimi, this is the other patch that  I was referring to.
>
> After this patch set, replacing the fw_read_file calls with the
> kernel_read_file_from_path() version is straight forward.  Nice!

Great, I take it you will pick it up then ? :)

  Luis

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web