From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939399AbdDSUZK (ORCPT ); Wed, 19 Apr 2017 16:25:10 -0400 Received: from mail-ua0-f174.google.com ([209.85.217.174]:35616 "EHLO mail-ua0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936983AbdDSUZI (ORCPT ); Wed, 19 Apr 2017 16:25:08 -0400 MIME-Version: 1.0 In-Reply-To: <20170419201120.GA17351@fury> References: <20170419174154.16518-1-carlo@caione.org> <20170419174154.16518-2-carlo@caione.org> <20170419201120.GA17351@fury> From: Carlo Caione Date: Wed, 19 Apr 2017 22:25:01 +0200 Message-ID: Subject: Re: [PATCH v2 1/2] hp-wmi: Do not shadow error values To: Darren Hart Cc: Carlo Caione , Andy Shevchenko , Andy Shevchenko , Platform Driver , linux-kernel@vger.kernel.org, Linux Upstreaming Team Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 19, 2017 at 10:11 PM, Darren Hart wrote: > On Wed, Apr 19, 2017 at 07:41:53PM +0200, Carlo Caione wrote: >> From: Carlo Caione >> >> 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