Thread (15 messages) 15 messages, 6 authors, 2022-02-18

Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2022-02-18 16:29:28
Also in: linuxppc-dev, lkml

On Fri, 18 Feb 2022 06:12:37 -0600
Segher Boessenkool [off-list ref] wrote:
On Fri, Feb 18, 2022 at 10:35:48AM +0900, Masahiro Yamada wrote:
quoted
On Fri, Feb 18, 2022 at 3:10 AM Segher Boessenkool
[off-list ref] wrote:  
quoted
On Fri, Feb 18, 2022 at 02:27:16AM +0900, Masahiro Yamada wrote:  
quoted
On Fri, Feb 18, 2022 at 1:49 AM David Laight [off-list ref] wrote:  
quoted
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.  
Why not?  Those two have identical semantics!  
e.g.)


[1] Open  include/linux/device.h with your favorite editor,
     then edit

static inline void *devm_kcalloc(struct device *dev,

    to

static void *devm_kcalloc(struct device *dev,


[2] Build the kernel  
You get some "defined but not used" warnings that are shushed for
inlines.  Do you see something else?

The semantics are the same.  Warnings are just warnings.  It builds
fine.
Kernel code should build with zero warnings, the compiler is telling you
something.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help