Re: [PATCH] staging: erofs: Add braces to do-while statements

From: Greg KH
Date: Sun Dec 09 2018 - 14:40:57 EST


On Sun, Dec 09, 2018 at 09:27:01AM -0800, Joe Perches wrote:
> On Sun, 2018-12-09 at 17:20 +0100, Greg KH wrote:
> > On Sun, Dec 09, 2018 at 04:59:00PM +0100, Thomas Jespersen wrote:
> > > This fixes warning reported by sparse (with -Wsparse-all).
> >
> > Why is sparse warning about this?
>
> Probably because it's the kernel preferred style
> to use single statement
>
> do {
> <foo>;
> } while (<bar>);
>
> over
>
> by about a 20:1 ratio.

Sparse is spitting out coding style complaints now?