lkml.org 
[lkml]   [2021]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] docs: Explain the desired position of function attributes
On Fri, Sep 24, 2021 at 01:27:20PM -0700, Randy Dunlap wrote:
> On 9/24/21 1:23 PM, Kees Cook wrote:
> > +The preferred order of elements for a function prototype is:
> > +
> > +- attributes on the preceding lines
> > +
>
> I thought that idea was already nacked: (it's more of a BSD thing AFAIK)
> (and I would NAK it if I could :)
>
> """
> > Attributes should be on their own line, they can be quite lengthy.
>
> No, no no. They really shouldn't.
> ""
>
> from: https://lore.kernel.org/mm-commits/CAHk-=wjS-Jg7sGMwUPpDsjv392nDOOs0CtUtVkp=S6Q7JzFJRw@mail.gmail.com/

Right -- and then Joe and Rasmus had some convincing counter-arguments,
IMO. So, given the outlined Docs patch, I'd like to see what folks can
propose in the form of alternative patches for this topic.

I genuinely don't care. I just want to have something I can follow for the
refactoring of the allocator attributes. :) The trouble I had with Linus's
suggestion is that some attributes don't work[1] at the end for function
definitions, so I'm left unable to follow his recommendations too.

-Kees

[1] https://lore.kernel.org/mm-commits/202109211630.2D00627@keescook/

--
Kees Cook

\
 
 \ /
  Last update: 2021-09-24 23:47    [W:0.139 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site