linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Stone <ahs3@redhat.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>
Subject: Re: [PATCH 1/3] ACPI: fix incorrect counts returned by acpi_parse_entries_array()
Date: Fri, 1 Jul 2016 16:38:42 -0600	[thread overview]
Message-ID: <13b0f0eb-a027-a439-a967-08ee188c9d96@redhat.com> (raw)
In-Reply-To: <CAJZ5v0jtxbTmVxi4y-aHpuD6m095047kknfJtkN+rCtJGXWtxQ@mail.gmail.com>

On 07/01/2016 03:56 PM, Rafael J. Wysocki wrote:
> On Fri, Jul 1, 2016 at 11:50 PM, Al Stone <ahs3@redhat.com> wrote:
>> On 07/01/2016 03:44 PM, Rafael J. Wysocki wrote:
>>> On Fri, Jul 1, 2016 at 11:36 PM, Al Stone <ahs3@redhat.com> wrote:
>>>> On 07/01/2016 03:25 PM, Rafael J. Wysocki wrote:
>>>>> On Fri, Jul 1, 2016 at 11:21 PM, Al Stone <ahs3@redhat.com> wrote:
>>>>>> The static function acpi_parse_entries_array() is provided an array of
>>>>>> type struct acpi_subtable_proc that has a callback function and a count.
>>>>>> The count should reflect how many times the callback has been successfully
>>>>>> called.  However, the current code only increments the 0th element of the
>>>>>> array, regardless of the number of entries in the array, or which callback
>>>>>> has been invoked.  The fix is to use the index into the array, instead of
>>>>>> a pointer to the beginning of the array.
>>>>>
>>>>> OK, so it would be good to say what the consequences of the problem are too.
>>>>>
>>>>
>>>> Hrm.  So replace the last sentence with something like:
>>>>
>>>>    The fix is to use the index into the array, instead of
>>>>    a pointer to the beginning of the array, so that the count
>>>>    for each element in the array in incremented by the
>>>>    corresponding callback.
>>>>
>>>> That feels a little clunky but is it closer to what you were
>>>> thinking?
>>>
>>> Well, not really.
>>>
>>> The code is arguably incorrect, but is there anything that does not
>>> work as expected as a result?  Any functional breakage?  Any
>>> misleading messages printed?
>>>
>>
>> That's the odd thing; there is no breakage.  Of any sort.
>>
>> But, no one relies on those values for anything at this point.  I've got a
>> couple of ideas I'm working on that are easier if it does work right, however.
> 
> That's information that should go into the changelog too.
> 
> "There are no functional consequences of the issue, but fixing it is
> necessary for future work."
> 
> Or similar.
> 

Will do in v2.

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

  reply	other threads:[~2016-07-01 22:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-01 21:21 [PATCH 0/3] Correct errors in acpi_parse_entries_array() Al Stone
2016-07-01 21:21 ` [PATCH 1/3] ACPI: fix incorrect counts returned by acpi_parse_entries_array() Al Stone
2016-07-01 21:25   ` Rafael J. Wysocki
2016-07-01 21:36     ` Al Stone
2016-07-01 21:44       ` Rafael J. Wysocki
2016-07-01 21:50         ` Al Stone
2016-07-01 21:56           ` Rafael J. Wysocki
2016-07-01 22:38             ` Al Stone [this message]
2016-07-01 21:21 ` [PATCH 2/3] ACPI: fix acpi_parse_entries_array() so it traverses all subtables Al Stone
2016-07-01 21:32   ` Rafael J. Wysocki
2016-07-01 21:41     ` Al Stone
2016-07-01 21:46       ` Rafael J. Wysocki
2016-07-01 21:55         ` Al Stone
2016-07-01 22:01           ` Rafael J. Wysocki
2016-07-01 23:07             ` Al Stone
2016-07-01 23:27               ` Rafael J. Wysocki
2016-07-01 21:21 ` [PATCH 3/3] ACPI: fix acpi_parse_entries_array() so it reports overflow correctly Al Stone
2016-07-01 21:40   ` Rafael J. Wysocki
2016-07-01 21:44     ` Al Stone
2016-07-01 21:54       ` Rafael J. Wysocki
2016-07-01 22:38         ` Al Stone
2016-07-01 22:45           ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13b0f0eb-a027-a439-a967-08ee188c9d96@redhat.com \
    --to=ahs3@redhat.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).