lkml.org 
[lkml]   [2014]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] kernel: acctc.c: Fixed else if not generally userful after a break or return warning
From
Date
On Wed, Sep 24, 2014 at 11:13:45PM -0400, Elshad Mustafayev wrote:
> > Fixed a coding style issue.
[]
> > diff --git a/kernel/acct.c b/kernel/acct.c
[]
> > @@ -376,9 +376,8 @@ static comp2_t encode_comp2_t(u64 value)
> > if (exp > MAXEXP2) {
> > /* Overflow. Return largest representable number instead. */
> > return (1ul << (MANTSIZE2+EXPSIZE2-1)) - 1;
> > - } else {
> > - return (value & (MAXFRACT2>>1)) | (exp << (MANTSIZE2-1));
> > }
> > + return (value & (MAXFRACT2>>1)) | (exp << (MANTSIZE2-1));
>
> Just what makes the replacement easier to follow?
> if (foo)
> return bar;
> else
> return baz;
> is no less idiomatic than
> if (foo)
> return bar;
> return baz;
>
> Al, really annoyed by how the words "coding style issue" are getting used as
> a magic incantation...

I agree.

I'll see about updating checkpatch to avoid warning on

if (foo)
return bar;
else
return baz;




\
 
 \ /
  Last update: 2014-09-25 07:01    [W:0.981 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site