From: Stephen Hemminger <stephen@networkplumber.org>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Masahiro Yamada <masahiroy@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
David Laight <David.Laight@aculab.com>,
Jakub Kicinski <kuba@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h
Date: Fri, 18 Feb 2022 08:29:20 -0800 [thread overview]
Message-ID: <20220218082920.06d6b80f@hermes.local> (raw)
In-Reply-To: <20220218121237.GQ614@gate.crashing.org>
On Fri, 18 Feb 2022 06:12:37 -0600
Segher Boessenkool <segher@kernel.crashing.org> wrote:
> On Fri, Feb 18, 2022 at 10:35:48AM +0900, Masahiro Yamada wrote:
> > On Fri, Feb 18, 2022 at 3:10 AM Segher Boessenkool
> > <segher@kernel.crashing.org> wrote:
> > > On Fri, Feb 18, 2022 at 02:27:16AM +0900, Masahiro Yamada wrote:
> > > > On Fri, Feb 18, 2022 at 1:49 AM David Laight <David.Laight@aculab.com> wrote:
> > > > > 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.
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Hemminger <stephen@networkplumber.org>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
David Laight <David.Laight@aculab.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h
Date: Fri, 18 Feb 2022 08:29:20 -0800 [thread overview]
Message-ID: <20220218082920.06d6b80f@hermes.local> (raw)
In-Reply-To: <20220218121237.GQ614@gate.crashing.org>
On Fri, 18 Feb 2022 06:12:37 -0600
Segher Boessenkool <segher@kernel.crashing.org> wrote:
> On Fri, Feb 18, 2022 at 10:35:48AM +0900, Masahiro Yamada wrote:
> > On Fri, Feb 18, 2022 at 3:10 AM Segher Boessenkool
> > <segher@kernel.crashing.org> wrote:
> > > On Fri, Feb 18, 2022 at 02:27:16AM +0900, Masahiro Yamada wrote:
> > > > On Fri, Feb 18, 2022 at 1:49 AM David Laight <David.Laight@aculab.com> wrote:
> > > > > 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.
next prev parent reply other threads:[~2022-02-18 16:30 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-17 12:19 [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h Christophe Leroy
2022-02-17 12:19 ` Christophe Leroy
2022-02-17 13:36 ` David Laight
2022-02-17 14:50 ` Christophe Leroy
2022-02-17 14:55 ` Christophe Leroy
2022-02-17 15:15 ` David Laight
2022-02-17 16:17 ` Masahiro Yamada
2022-02-17 16:17 ` Masahiro Yamada
2022-02-17 16:49 ` David Laight
2022-02-17 16:49 ` David Laight
2022-02-17 17:27 ` Masahiro Yamada
2022-02-17 17:27 ` Masahiro Yamada
2022-02-17 18:07 ` Segher Boessenkool
2022-02-17 18:07 ` Segher Boessenkool
2022-02-18 1:35 ` Masahiro Yamada
2022-02-18 1:35 ` Masahiro Yamada
2022-02-18 12:12 ` Segher Boessenkool
2022-02-18 12:12 ` Segher Boessenkool
2022-02-18 16:29 ` Stephen Hemminger [this message]
2022-02-18 16:29 ` Stephen Hemminger
2022-02-18 16:44 ` Segher Boessenkool
2022-02-18 16:44 ` Segher Boessenkool
2022-02-18 8:41 ` David Laight
2022-02-18 8:41 ` David Laight
2022-02-17 15:42 ` Joe Perches
2022-02-17 15:42 ` Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220218082920.06d6b80f@hermes.local \
--to=stephen@networkplumber.org \
--cc=David.Laight@aculab.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=masahiroy@kernel.org \
--cc=mingo@redhat.com \
--cc=ndesaulniers@google.com \
--cc=netdev@vger.kernel.org \
--cc=segher@kernel.crashing.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.