lkml.org 
[lkml]   [2019]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 19/19] locking/lockdep: Change if to else-if when checking bfs errors
From
Date
On Tue, 2019-03-19 at 09:29 -0700, Bart Van Assche wrote:
> On Mon, 2019-03-18 at 16:57 +0800, Yuyang Du wrote:
> > - if (ret < 0) {
> > + if (unlikely(ret < 0)) {
> > print_bfs_bug(ret);
> > return 0;
> > }
> > - if (ret == 1)
> > + else if (ret == 1)
> > return ret;
>
> Have you verified this patch series with checkpatch? Checkpatch should have
> reported that you are changing code that conforms to the coding style into
> code that does not conform to the kernel coding style. Checkpatch should have
> reported the following:
>
> "else is not generally useful after a break or return"

checkpatch just ain't that smart.
You're welcome to try to improve it.

\
 
 \ /
  Last update: 2019-03-19 18:20    [W:0.242 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site