lkml.org 
[lkml]   [2022]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h
Date
From: Masahiro Yamada
> Sent: 17 February 2022 17:27
>
> On Fri, Feb 18, 2022 at 1:49 AM David Laight <David.Laight@aculab.com> wrote:
> >
> > From: Masahiro Yamada
> > > Sent: 17 February 2022 16:17
> > ...
> > > No. Not that one.
> > >
> > > The commit you presumably want to revert is:
> > >
> > > a771f2b82aa2 ("[PATCH] Add a section about inlining to
> > > Documentation/CodingStyle")
> > >
> > > This is now referred to as "__always_inline disease", though.
> >
> > That description is largely fine.
> >
> > Inappropriate 'inline' ought to be removed.
> > Then 'inline' means - 'really do inline this'.
>
>
> You cannot change "static inline" to "static"
> in header files.

You'd need some 'magicary' to get an extern except for a special
include that generated the visible function.
It has been done.

> If "static inline" meant __always_inline,
> there would be no way to negate it.
> That's why we need both inline and __always_inline.

I'd go the other way, 'inline' and 'inline_for_code_bloat'
(or maybe inline_for_speed).
Much the same as the noinline's to stop stack bloat.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
\
 
 \ /
  Last update: 2022-02-18 09:42    [W:0.084 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site