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


Groups > linux.kernel > #1435649

Re: [PATCH 2/3] ACPI: fix acpi_parse_entries_array() so it traverses all subtables

From Al Stone <ahs3@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/3] ACPI: fix acpi_parse_entries_array() so it traverses all subtables
Date 2016-07-01 23:50 +0200
Message-ID <rQetY-3mA-11@gated-at.bofh.it> (permalink)
References <rQeaB-3g8-7@gated-at.bofh.it> <rQeaB-3g8-5@gated-at.bofh.it> <rQekh-3jb-11@gated-at.bofh.it>
Organization Red Hat, Inc.

Show all headers | View raw


On 07/01/2016 03:32 PM, Rafael J. Wysocki wrote:
> On Fri, Jul 1, 2016 at 11:21 PM, Al Stone <ahs3@redhat.com> wrote:
>> Without this patch, the acpi_parse_entries_array() function will return
>> the very first time there is any error found in either the array of
>> callback functions or if one of the callbacks returns an non-zero value.
>> However, the array of callbacks could still have valid entries further
>> on in the array, or the callbacks may be able to process subsequent
>> subtables without error.  The change here makes the function consistent
>> with its description so that it will properly return the sum of all
>> matching entries for all proc handlers, instead of stopping abruptly
>> as it does today.
> 
> I'm not sure I follow.
> 
> You seem to be saying that the function should process all of the
> subtables etc even though errors have been found for some of them, but
> it still will return an error in the end if there are any errors.  How
> exactly does it help to continue processing in case of an error, then?

The use case I have in mind is to simply count all of the subtables of
a certain type.  If for some reason, the callback -- or any other callback
-- fails, the traversal of all the subtables stops immediately.  So, I
could have two callbacks, and if the first one fails on the first subtable
of its type, traversal stops.  The count for the second callback will be
zero which may or may not be correct.

-- 
ciao,
al
-----------------------------------
Al Stone
Software Engineer
Red Hat, Inc.
ahs3@redhat.com
-----------------------------------

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/3] ACPI: fix acpi_parse_entries_array() so it traverses all subtables Al Stone <ahs3@redhat.com> - 2016-07-01 23:30 +0200
  Re: [PATCH 2/3] ACPI: fix acpi_parse_entries_array() so it traverses  all subtables "Rafael J. Wysocki" <rafael@kernel.org> - 2016-07-01 23:40 +0200
    Re: [PATCH 2/3] ACPI: fix acpi_parse_entries_array() so it traverses  all subtables Al Stone <ahs3@redhat.com> - 2016-07-01 23:50 +0200
      Re: [PATCH 2/3] ACPI: fix acpi_parse_entries_array() so it traverses  all subtables "Rafael J. Wysocki" <rafael@kernel.org> - 2016-07-01 23:50 +0200
        Re: [PATCH 2/3] ACPI: fix acpi_parse_entries_array() so it traverses  all subtables Al Stone <ahs3@redhat.com> - 2016-07-02 00:00 +0200
          Re: [PATCH 2/3] ACPI: fix acpi_parse_entries_array() so it traverses  all subtables "Rafael J. Wysocki" <rafael@kernel.org> - 2016-07-02 00:10 +0200
            Re: [PATCH 2/3] ACPI: fix acpi_parse_entries_array() so it traverses  all subtables Al Stone <ahs3@redhat.com> - 2016-07-02 01:10 +0200
              Re: [PATCH 2/3] ACPI: fix acpi_parse_entries_array() so it traverses  all subtables "Rafael J. Wysocki" <rafael@kernel.org> - 2016-07-02 01:30 +0200

csiph-web