Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754659AbcDSOFe (ORCPT ); Tue, 19 Apr 2016 10:05:34 -0400 Received: from smtp2-g21.free.fr ([212.27.42.2]:51109 "EHLO smtp2-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753106AbcDSOFd (ORCPT ); Tue, 19 Apr 2016 10:05:33 -0400 Subject: Re: [PATCH] clocksource/drivers/tango-xtal: Fix incorrect test To: Daniel Lezcano Cc: Thomas Gleixner , Sebastian Frias , Mans Rullgard , LKML References: <57162153.4070707@free.fr> <20160419131330.GA419@linaro.org> From: Mason Message-ID: <57163B1F.7050402@free.fr> Date: Tue, 19 Apr 2016 16:05:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 MIME-Version: 1.0 In-Reply-To: <20160419131330.GA419@linaro.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 964 Lines: 32 On 19/04/2016 15:13, Daniel Lezcano wrote: > On Tue, Apr 19, 2016 at 02:15:15PM +0200, Mason wrote: > >> From: Marc Gonzalez >> >> Commit 0881841f7e78 changed "if (ret != 0)" to "if (!ret)" >> >> Fixes: 0881841f7e78 ("Replace code by clocksource_mmio_init") >> Signed-off-by: Marc Gonzalez >> --- > > Please resend the patch with the fix only, without s/ret/err/ As I wrote on IRC, I think it is misguided to consider variable renaming as not part of the fix. A properly named variable helps reviewers by communicating intent. Had I named the variable 'err' in the first place, would you have introduced the bug by writing if (!err) { pr_err("registration failed"); } or would if (!err) have jumped out for an error path? (Not a rhetorical question; if you say it would not have helped, then I guess my mental workflow is different.) How do others feel about this? Thomas? Regards.