[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57163B1F.7050402@free.fr>
Date: Tue, 19 Apr 2016 16:05:19 +0200
From: Mason <slash.tmp@...e.fr>
To: Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Sebastian Frias <sf84@...oste.net>,
Mans Rullgard <mans@...sr.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] clocksource/drivers/tango-xtal: Fix incorrect test
On 19/04/2016 15:13, Daniel Lezcano wrote:
> On Tue, Apr 19, 2016 at 02:15:15PM +0200, Mason wrote:
>
>> From: Marc Gonzalez <marc_gonzalez@...madesigns.com>
>>
>> Commit 0881841f7e78 changed "if (ret != 0)" to "if (!ret)"
>>
>> Fixes: 0881841f7e78 ("Replace code by clocksource_mmio_init")
>> Signed-off-by: Marc Gonzalez <marc_gonzalez@...madesigns.com>
>> ---
>
> 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.
Powered by blists - more mailing lists