[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b2c2f344419156c75c6f58258cab6e7a60c2d4a9.camel@perches.com>
Date: Fri, 17 Apr 2020 14:25:04 -0700
From: Joe Perches <joe@...ches.com>
To: Luben Tuikov <luben.tuikov@....com>,
Andy Whitcroft <apw@...onical.com>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: checkpatch.pl warning for "return" with value
On Fri, 2020-04-17 at 14:52 -0400, Luben Tuikov wrote:
> Also checking and returning from a function, doesn't
> always have to be binary. It could be,
>
> if (A) {
> ...;
> return X;
> } else if (B) {
> ...;
> return Y;
> } else {
> ...;
> return Z;
> }
> }
>
> And interestingly, checkpatch.pl doesn't complain for
> the triplet above. But if I remove condition B, above,
> it does complain.
My recollection is false positives existed so the
else if case was not wanted.
Powered by blists - more mailing lists