lkml.org 
[lkml]   [2020]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] fs/aio.c: Cosmetic
From
Date
On Mon, 2020-11-02 at 17:50 -0700, Andreas Dilger wrote:
> On Nov 2, 2020, at 2:58 PM, Alejandro Colomar <colomar.6.4.3@gmail.com> wrote:
> > Changes:
> > - Consistently use 'unsigned int', instead of 'unsigned'.
> > - Add a blank line after variable declarations.
> > - Move variable declarations to the top of functions.
> > - Add a blank line at the top of functions if there are no declarations.
>
> I'd agree that the other changes are following kernel coding style, but
> I've never heard of leaving a blank line at the start of functions without
> any local variables.

I think that is odd as well.

> I don't see anything in process/coding-style.rst to
> support this change, nor are the majority of variable-less functions
> formatted this way, and it seems to just be a waste of vertical space.

checkpatch emits a --strict CHECK for those blank lines after
open braces


CHECK: Blank lines aren't necessary after an open brace '{'
#200: FILE: fs/aio.c:256:
{
+

CHECK: Blank lines aren't necessary after an open brace '{'
#246: FILE: fs/aio.c:370:
{
+

etc...


\
 
 \ /
  Last update: 2020-11-03 04:23    [W:0.054 / U:3.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site