From: H. Peter Anvin on
On 05/11/2010 05:39 PM, Joe Perches wrote:
> This patch removes from arch/x86/ all the unnecessary
> return; statements that precede the last closing brace of
> void functions.
>
> It does not remove returns that are immediately
> preceded by a label as gcc doesn't like that.

And the point of this is?

I fail to see how this improves the clarity of the code one iota, and
isn't anything but just churn.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Joe Perches on
On Tue, 2010-05-11 at 17:41 -0700, H. Peter Anvin wrote:
> On 05/11/2010 05:39 PM, Joe Perches wrote:
> > This patch removes from arch/x86/ all the unnecessary
> > return; statements that precede the last closing brace of
> > void functions.
> And the point of this is?
> I fail to see how this improves the clarity of the code one iota, and
> isn't anything but just churn.

Just naked consistency.

Most all kernel void functions don't use return before
the closing brace.

The good thing about code removal is it doesn't make
any impact on git blame.

Ignore it or not. No worries to me.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Joe Perches on
On Tue, 2010-05-11 at 18:00 -0700, Joe Perches wrote:
> On Tue, 2010-05-11 at 17:41 -0700, H. Peter Anvin wrote:
> > On 05/11/2010 05:39 PM, Joe Perches wrote:
> > > This patch removes from arch/x86/ all the unnecessary
> > > return; statements that precede the last closing brace of
> > > void functions.
> > And the point of this is?
> > I fail to see how this improves the clarity of the code one iota, and
> > isn't anything but just churn.
> Most all kernel void functions don't use return before
> the closing brace.

Just a stat from arch/x86:

There may be a little over 2000 void functions in arch/x86/,
40 use returns before the trailing brace.

Call it churn or consistency, <shrug>.

cheers, Joe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: H. Peter Anvin on
On 05/11/2010 06:53 PM, Joe Perches wrote:
>
> Just a stat from arch/x86:
>
> There may be a little over 2000 void functions in arch/x86/,
> 40 use returns before the trailing brace.
>
> Call it churn or consistency, <shrug>.
>

No, please get something straight:

Consistency is not an end in itself. Readability is, however.

Avoiding churn, however, is *also* an end in itself. Sometimes churn is
motivated by an increase in readability. Churn is *not* motivated just
for "consistency" unless it improves readability.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: H. Peter Anvin on
On 05/11/2010 08:51 PM, Joe Perches wrote:
> On Tue, 2010-05-11 at 20:37 -0700, H. Peter Anvin wrote:
>> Churn is *not* motivated just
>> for "consistency" unless it improves readability.
>
> Consistency improves readability.

As a general rule, sure. For any specific instance it is a big "it
depends".

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/