From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
<linux-kbuild@vger.kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nsc@kernel.org>, <linux-s390@vger.kernel.org>,
Heiko Carstens <hca@linux.ibm.com>,
"Vasily Gorbik" <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
"Arnd Bergmann" <arnd@arndb.de>,
Bjorn Andersson <andersson@kernel.org>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
Christian Marangi <ansuelsmth@gmail.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] err.h: use __always_inline on all error pointer helpers
Date: Tue, 26 May 2026 17:01:06 +0200 [thread overview]
Message-ID: <b5e15330-ed64-4f31-bea2-bb877a24c1ce@intel.com> (raw)
In-Reply-To: <20260526101851.2495110-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@kernel.org>
Date: Tue, 26 May 2026 12:18:41 +0200
> From: Arnd Bergmann <arnd@arndb.de>
>
> While testing randconfig builds on s390, I came across a
> link failure with CONFIG_DMA_SHARED_BUFFER disabled:
>
> ERROR: modpost: "dma_buf_put" [drivers/iommu/iommufd/iommufd.ko] undefined!
>
> The problem here is that IS_ERR() is not inlined and dead code elimination
> fails as a consequence.
>
> The err.h helpers all turn into a trivial assignment ot a bit mask
^^
or
(nit)
> and should never result in a function call, so force them to always be
> inline. This should generally result in better object code aside from
> avoiding the link failure above.
bloat-o-meter would be nice to see but optional, it's obvious to me that
these helpers should always get inlined.
Not sure why compilers sometimes decide to uninline a couple
instructions (feels like there's sorta dumb logic "oh it's used more
than X times -- uninline no matter what").
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Thanks,
Olek
next prev parent reply other threads:[~2026-05-26 15:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 10:18 Arnd Bergmann
2026-05-26 15:01 ` Alexander Lobakin [this message]
2026-05-26 21:03 ` Arnd Bergmann
2026-05-27 14:06 ` Alexander Lobakin
2026-05-27 14:25 ` Arnd Bergmann
2026-05-27 14:30 ` Alexander Lobakin
2026-05-27 22:13 ` David Laight
2026-05-26 19:37 ` Nathan Chancellor
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=b5e15330-ed64-4f31-bea2-bb877a24c1ce@intel.com \
--to=aleksander.lobakin@intel.com \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=andersson@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=ansuelsmth@gmail.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=nsc@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®