From: sashiko-bot@kernel.org
To: "Yury Norov" <ynorov@nvidia.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH v2 2/5] lib/bitrev: Introduce GENERIC_BITREVERSE
Date: Wed, 06 May 2026 21:49:42 +0000 [thread overview]
Message-ID: <20260506214943.1AAE8C2BCB0@smtp.kernel.org> (raw)
In-Reply-To: <20260506175207.110893-3-ynorov@nvidia.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The commit's instructions for architectures to explicitly enable GENERIC_BITREVERSE will trigger Kconfig unmet dependency warnings.
--
commit dfa2feef3c11e8e7f890a24d4a12c9d0c88f4918
Author: Yury Norov <ynorov@nvidia.com>
lib/bitrev: Introduce GENERIC_BITREVERSE
This commit introduces GENERIC_BITREVERSE to allow architectures to provide
hardware-accelerated bit reversal implementations while still being able to
fall back to the generic version. It modifies Kconfig and the Makefile to
make GENERIC_BITREVERSE selectable.
> Architectures that require generic bitreverse API as a fallback should
> explicitly enable GENERIC_BITREVERSE together with HAVE_ARCH_BITREVERSE.
Will this instruction for architectures to explicitly enable GENERIC_BITREVERSE
trigger Kconfig unmet dependency warnings?
> diff --git a/lib/Kconfig b/lib/Kconfig
> index d8e7e89ae3205..a33988adfaa3e 100644
> --- a/lib/Kconfig
> +++ b/lib/Kconfig
[ ... ]
> @@ -63,6 +64,17 @@ config HAVE_ARCH_BITREVERSE
> This option enables the use of hardware bit-reversal instructions on
> architectures which support such operations.
>
> +config GENERIC_BITREVERSE
> + tristate
> + depends on BITREVERSE
If an architecture follows the instruction in the commit message and
uses select GENERIC_BITREVERSE unconditionally, Kconfig will force it to y
even when BITREVERSE is n or m.
Even if an architecture attempts to select it conditionally via
select GENERIC_BITREVERSE if HAVE_ARCH_BITREVERSE, a warning will still occur
when BITREVERSE=m. Kconfig promotes the boolean condition HAVE_ARCH_BITREVERSE
to y, which in turn forces the tristate GENERIC_BITREVERSE to y, violating its
dependency on BITREVERSE (m).
Should architectures instead use select GENERIC_BITREVERSE if BITREVERSE to
properly inherit the dependency, or should the Kconfig dependencies be
restructured?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260506175207.110893-1-ynorov@nvidia.com?part=2
next prev parent reply other threads:[~2026-05-06 21:49 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 17:52 Yury Norov
2026-05-06 17:52 ` Yury Norov
2026-05-06 17:52 ` [PATCH v2 1/5] arch: select HAVE_ARCH_BITREVERSE conditionally on BITREVERSE Yury Norov
2026-05-06 17:52 ` Yury Norov
2026-05-06 21:37 ` sashiko-bot
2026-05-12 2:25 ` Yury Norov
2026-05-12 2:25 ` Yury Norov
2026-05-19 22:20 ` Yury Norov
2026-05-19 22:20 ` Yury Norov
2026-06-09 1:26 ` Jinjie Ruan
2026-06-09 1:26 ` Jinjie Ruan
2026-05-06 17:52 ` [PATCH v2 2/5] lib/bitrev: Introduce GENERIC_BITREVERSE Yury Norov
2026-05-06 17:52 ` Yury Norov
2026-05-06 21:49 ` sashiko-bot [this message]
2026-06-09 1:53 ` Jinjie Ruan
2026-06-09 1:53 ` Jinjie Ruan
2026-05-06 17:52 ` [PATCH v2 3/5] bitops: Define generic___bitrev8/16/32 for reuse Yury Norov
2026-05-06 17:52 ` Yury Norov
2026-05-06 17:52 ` [PATCH v2 4/5] arch/riscv: Add bitrev.h file to support rev8 and brev8 Yury Norov
2026-05-06 17:52 ` Yury Norov
2026-05-06 22:23 ` sashiko-bot
2026-06-09 1:38 ` Jinjie Ruan
2026-06-09 1:38 ` Jinjie Ruan
2026-05-06 17:52 ` [PATCH v2 5/5] MAINTAINERS: BITOPS: include bitrev.[ch] Yury Norov
2026-05-06 17:52 ` 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=20260506214943.1AAE8C2BCB0@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 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.