Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750951AbdCPA3y (ORCPT ); Wed, 15 Mar 2017 20:29:54 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:41586 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750788AbdCPA3x (ORCPT ); Wed, 15 Mar 2017 20:29:53 -0400 Date: Wed, 15 Mar 2017 17:28:19 -0700 From: Darren Hart To: Andy Shevchenko Cc: Arvind Yadav , Henrique de Moraes Holschuh , Andy Shevchenko , ibm-acpi-devel@lists.sourceforge.net, Platform Driver , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] x86: thinkpad_acpi: Handle return error. Message-ID: <20170316002819.GA11351@fury> References: <1488786206-20190-1-git-send-email-arvind.yadav.cs@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1681 Lines: 40 On Mon, Mar 06, 2017 at 10:45:50AM +0200, Andy Shevchenko wrote: > On Mon, Mar 6, 2017 at 9:43 AM, Arvind Yadav wrote: > > This patch is for handling a return error. > > > > Signed-off-by: Arvind Yadav > > --- > > drivers/platform/x86/thinkpad_acpi.c | 15 ++++++++++++--- > > 1 file changed, 12 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c > > index 1d18b32..19ad3ec 100644 > > --- a/drivers/platform/x86/thinkpad_acpi.c > > +++ b/drivers/platform/x86/thinkpad_acpi.c > > @@ -1237,9 +1237,11 @@ static int tpacpi_rfk_hook_set_block(void *data, bool blocked) > > /* try to set radio state */ > > > res = (tp_rfk->ops->set_status)(blocked ? > > TPACPI_RFK_RADIO_OFF : TPACPI_RFK_RADIO_ON); > > Just in case: first parens are redundant here. > > > + if (res < 0) > > + return res; > > So, this changes behaviour. Before we call _rfk_update_swstate() > independently on error code. > > Care to explain in commit message how this change does / does not > affect overall user experience? Arvind has made a number of similar such changes throughout the tree, I presume with some automation. In this case, since there is no indication of a particular manifestation of this bug on hardware, I will presume the same approach was taken here. I'm dropping this patch as "changes requested" because at the very least this needs a commit log which documents the problem manifested and why the behavioral change is appropriate. -- Darren Hart VMware Open Source Technology Center