Re: [patch 9/9] mm/vmalloc: add __alloc_size attributes for better bounds checking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 10, 2021 at 10:24 AM Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Thu, Sep 9, 2021 at 8:10 PM Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> >
> > +__alloc_size(1)
> >  extern void *vmalloc(unsigned long size);
> [...]
>
> All of these are added in the wrong place

Huh?
$ grep -rn __always_inline
$ grep -rn noinline
$ grep -rn __cold
...

Not that we have explicit guidance here in any coding style guide,
perhaps we can make a clarification in
Documentation/process/coding-style.rst?

I'd say when using function attributes, we tend to have the linkage
(ie. explicitly static or implicitly extern), followed by function
attributes related to inlining (__always_inline, noinline), followed
by return type, followed by function level attributes, followed by
parameter list. But I don't think we're even internally consistent
here.
-- 
Thanks,
~Nick Desaulniers




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux