Re: [PATCH v2 1/2] hp-wmi: Do not shadow error values

2017-04-19 Thread Carlo Caione
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

Re: [PATCH v2 1/2] hp-wmi: Do not shadow error values

2017-04-19 Thread Carlo Caione
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 >>

Re: [PATCH v2 1/2] hp-wmi: Do not shadow error values

2017-04-19 Thread Darren Hart
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

Re: [PATCH v2 1/2] hp-wmi: Do not shadow error values

2017-04-19 Thread Darren Hart
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

[PATCH v2 1/2] hp-wmi: Do not shadow error values

2017-04-19 Thread Carlo Caione
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

[PATCH v2 1/2] hp-wmi: Do not shadow error values

2017-04-19 Thread Carlo Caione
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