linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Carlo Caione <carlo@endlessm.com>
To: Darren Hart <dvhart@infradead.org>
Cc: Carlo Caione <carlo@caione.org>,
	Andy Shevchenko <andy@infradead.org>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Platform Driver <platform-driver-x86@vger.kernel.org>,
	linux-kernel@vger.kernel.org,
	Linux Upstreaming Team <linux@endlessm.com>
Subject: Re: [PATCH v2 1/2] hp-wmi: Do not shadow error values
Date: Wed, 19 Apr 2017 22:25:01 +0200	[thread overview]
Message-ID: <CAL9uMOGw_mPxzSjyFKcs7PT9b0FMow1gujiBEMQJEbcznjgfLg@mail.gmail.com> (raw)
In-Reply-To: <20170419201120.GA17351@fury>

On Wed, Apr 19, 2017 at 10:11 PM, Darren Hart <dvhart@infradead.org> wrote:
> On Wed, Apr 19, 2017 at 07:41:53PM +0200, Carlo Caione wrote:
>> From: Carlo Caione <carlo@endlessm.com>
>>
>> All the helper functions (i.e. hp_wmi_dock_state, hp_wmi_tablet_state,
>> ...) using hp_wmi_perform_query to perform an HP WMI query shadow the
>> returned value in case of error.
>>
>> We return -EINVAL only when the HP WMI query returns a positive value
>> (the specific error code) to not mix this up with the actual value
>> returned by the helper function.
>
> So Andy is correct in that we try to avoid shadowing error codes where possible.
> I accepted v1 of this series because it fixed an existing problem in a way
> consistent with the existing code.
>
> Since v1 is already in for-next, let's consider the following a subsequent
> cleanup. Would you please create a new patch to address the shadowing error code
> issues on top of the v1 patch series.

No problem. On its way.

-- 
Carlo Caione  |  +39.340.80.30.096  |  Endless

  reply	other threads:[~2017-04-19 20:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 17:41 [PATCH v2 0/2] hp-wmi: Fix dock status and tablet mode reporting Carlo Caione
2017-04-19 17:41 ` [PATCH v2 1/2] hp-wmi: Do not shadow error values Carlo Caione
2017-04-19 20:11   ` Darren Hart
2017-04-19 20:25     ` Carlo Caione [this message]
2017-04-19 17:41 ` [PATCH v2 2/2] hp-wmi: Fix detection for dock and tablet mode Carlo Caione

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=CAL9uMOGw_mPxzSjyFKcs7PT9b0FMow1gujiBEMQJEbcznjgfLg@mail.gmail.com \
    --to=carlo@endlessm.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=andy@infradead.org \
    --cc=carlo@caione.org \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@endlessm.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /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).