* [PATCH 0/2] lib: compile generic bitrev based on GENERIC_BITREVERSE @ 2026-04-27 20:52 Yury Norov 2026-04-27 20:52 ` [PATCH 1/2] lib: compile generic bitrev.c conditionally " Yury Norov 2026-04-27 20:52 ` [PATCH 2/2] MAINTAINERS: BITOPS: include bitrev.[ch] Yury Norov 0 siblings, 2 replies; 3+ messages in thread From: Yury Norov @ 2026-04-27 20:52 UTC (permalink / raw) To: linux-kernel, Andrew Morton, Arnd Bergmann, Jinjie Ruan, Rasmus Villemoes, Yury Norov Cc: Yury Norov The bitrev.c is compiled based on CONFIG_BITREVERSE=y, but everything inside is protected with CONFIG_GENERIC_BITREVERSE. Make it simpler by switching the Makefile to compile lib/bitrev.c based on the proper config. Also, cover generic bitrev.[ch] with BITOPS entry. Based on bitmap-for-next: https://github.com/norov/linux/tree/bitmap-for-next Yury Norov (2): lib: compile generic bitrev.c conditionally on the proper option MAINTAINERS: BITOPS: include bitrev.[ch] MAINTAINERS | 2 ++ lib/Makefile | 2 +- lib/bitrev.c | 3 --- 3 files changed, 3 insertions(+), 4 deletions(-) -- 2.51.0 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] lib: compile generic bitrev.c conditionally on GENERIC_BITREVERSE 2026-04-27 20:52 [PATCH 0/2] lib: compile generic bitrev based on GENERIC_BITREVERSE Yury Norov @ 2026-04-27 20:52 ` Yury Norov 2026-04-27 20:52 ` [PATCH 2/2] MAINTAINERS: BITOPS: include bitrev.[ch] Yury Norov 1 sibling, 0 replies; 3+ messages in thread From: Yury Norov @ 2026-04-27 20:52 UTC (permalink / raw) To: linux-kernel, Andrew Morton, Arnd Bergmann, Jinjie Ruan, Rasmus Villemoes, Yury Norov Cc: Yury Norov The file is compiled based on CONFIG_BITREVERSE=y, but everything inside is protected with CONFIG_GENERIC_BITREVERSE. Make it simpler by switching the Makefile to compile lib/bitrev.c based on the proper config. Signed-off-by: Yury Norov <ynorov@nvidia.com> --- lib/Makefile | 2 +- lib/bitrev.c | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/Makefile b/lib/Makefile index f33a24bf1c19..23e07d19d01c 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 obj-$(CONFIG_LINEAR_RANGES) += linear_ranges.o obj-$(CONFIG_PACKING) += packing.o obj-$(CONFIG_PACKING_KUNIT_TEST) += packing_test.o diff --git a/lib/bitrev.c b/lib/bitrev.c index 3a53ff67aeba..05088231f31f 100644 --- a/lib/bitrev.c +++ b/lib/bitrev.c @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0-only -#ifdef CONFIG_GENERIC_BITREVERSE #include <linux/types.h> #include <linux/module.h> #include <linux/bitrev.h> @@ -43,5 +42,3 @@ const u8 byte_rev_table[256] = { 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff, }; EXPORT_SYMBOL_GPL(byte_rev_table); - -#endif /* CONFIG_GENERIC_BITREVERSE */ -- 2.51.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] MAINTAINERS: BITOPS: include bitrev.[ch] 2026-04-27 20:52 [PATCH 0/2] lib: compile generic bitrev based on GENERIC_BITREVERSE Yury Norov 2026-04-27 20:52 ` [PATCH 1/2] lib: compile generic bitrev.c conditionally " Yury Norov @ 2026-04-27 20:52 ` Yury Norov 1 sibling, 0 replies; 3+ messages in thread From: Yury Norov @ 2026-04-27 20:52 UTC (permalink / raw) To: linux-kernel, Andrew Morton, Arnd Bergmann, Jinjie Ruan, Rasmus Villemoes, Yury Norov Cc: Yury Norov Arch bitrev API is covered in MAINTAINERS under the BITOPS entry, while generic bitrev is unmaintained. Move it under BITOPS too. Signed-off-by: Yury Norov <ynorov@nvidia.com> --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index d885cf5ccc34..7ad239209380 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4547,7 +4547,9 @@ F: arch/*/lib/bitops.c F: include/asm-generic/bitops F: include/asm-generic/bitops.h F: include/linux/bitops.h +F: include/linux/bitrev.h F: include/linux/count_zeros.h +F: lib/bitrev.c F: lib/hweight.c F: lib/test_bitops.c F: lib/tests/bitops_kunit.c -- 2.51.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-27 20:52 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-04-27 20:52 [PATCH 0/2] lib: compile generic bitrev based on GENERIC_BITREVERSE Yury Norov 2026-04-27 20:52 ` [PATCH 1/2] lib: compile generic bitrev.c conditionally " Yury Norov 2026-04-27 20:52 ` [PATCH 2/2] MAINTAINERS: BITOPS: include bitrev.[ch] Yury Norov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox