From: sashiko-bot@kernel.org
To: "Yury Norov" <ynorov@nvidia.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH 5/6] lib: compile generic bitrev.c conditionally on GENERIC_BITREVERSE
Date: Fri, 01 May 2026 21:15:34 +0000 [thread overview]
Message-ID: <20260501211535.4A834C2BCB8@smtp.kernel.org> (raw)
In-Reply-To: <20260430211351.658193-6-ynorov@nvidia.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The commit breaks loadable module support for `lib/bitrev.c` by forcibly compiling it statically into the core kernel (`vmlinux`) even when configured as a module (`CONFIG_BITREVERSE=m`).
--
commit 7ea6ceee0bfd2cae761187221063672a5947f4c4
Author: Yury Norov <ynorov@nvidia.com>
lib: compile generic bitrev.c conditionally on GENERIC_BITREVERSE
This commit simplifies the build logic for the generic bit-reversal library.
It changes the Makefile to compile lib/bitrev.c based on
CONFIG_GENERIC_BITREVERSE instead of CONFIG_BITREVERSE, and removes the
corresponding preprocessor conditionals from the source file.
> diff --git a/lib/Makefile b/lib/Makefile
> index f33a24bf1c19a..23e07d19d01c9 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -145,7 +145,7 @@ obj-$(CONFIG_DEBUG_PREEMPT) += smp_processor_id.o
> obj-$(CONFIG_LIST_HARDENED) += list_debug.o
> obj-$(CONFIG_DEBUG_OBJECTS) += debugobjects.o
>
> -obj-$(CONFIG_BITREVERSE) += bitrev.o
> +obj-$(CONFIG_GENERIC_BITREVERSE) += bitrev.o
Will this break loadable module support for lib/bitrev.c?
CONFIG_BITREVERSE is a tristate, allowing the library to be built as a
module. However, CONFIG_GENERIC_BITREVERSE is a boolean. When
CONFIG_BITREVERSE is set to modular, CONFIG_GENERIC_BITREVERSE evaluates
to y.
By switching the Makefile rule to use CONFIG_GENERIC_BITREVERSE, bitrev.o
will be built into the core kernel unconditionally when the generic
implementation is used, even if a modular build was requested.
Could this regression lead to unintended kernel bloat by ignoring the
configuration intent?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260430211351.658193-1-ynorov@nvidia.com?part=5
next prev parent reply other threads:[~2026-05-01 21:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 21:13 [PATCH 0/6] lib: rework bitreverse Yury Norov
2026-04-30 21:13 ` [PATCH 1/6] lib: include crc32.h conditionally on CONFIG_CRC32 Yury Norov
2026-05-01 21:15 ` sashiko-bot
2026-05-04 8:03 ` Arnd Bergmann
2026-05-04 12:43 ` David Laight
2026-05-04 16:46 ` Yury Norov
2026-05-04 17:18 ` Arnd Bergmann
2026-05-04 18:32 ` Yury Norov
2026-05-04 19:05 ` Arnd Bergmann
2026-05-05 19:03 ` Yury Norov
2026-05-06 6:30 ` Eric Biggers
2026-04-30 21:13 ` [PATCH 2/6] lib/bitrev: Introduce GENERIC_BITREVERSE and cleanup Kconfig Yury Norov
2026-05-01 21:15 ` sashiko-bot
2026-04-30 21:13 ` [PATCH 3/6] bitops: Define generic __bitrev8/16/32 for reuse Yury Norov
2026-05-01 21:15 ` sashiko-bot
2026-04-30 21:13 ` [PATCH 4/6] arch/riscv: Add bitrev.h file to support rev8 and brev8 Yury Norov
2026-05-01 21:15 ` sashiko-bot
2026-04-30 21:13 ` [PATCH 5/6] lib: compile generic bitrev.c conditionally on GENERIC_BITREVERSE Yury Norov
2026-05-01 21:15 ` sashiko-bot [this message]
2026-04-30 21:13 ` [PATCH 6/6] MAINTAINERS: BITOPS: include bitrev.[ch] Yury Norov
2026-05-02 1:40 ` [PATCH 0/6] lib: rework bitreverse Yury Norov
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=20260501211535.4A834C2BCB8@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=sashiko@lists.linux.dev \
--cc=ynorov@nvidia.com \
/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