Re: [PATCH v2] unroll: Drop the unused unrolled and unrolled_none macros

From: Eric Biggers

Date: Sat Oct 24 2026 - 14:15:32 EST


On Sat, Oct 24, 2026 at 12:31:08AM +0800, Tzu-Ching Yang wrote:
> unrolled and unrolled_none are object-like macros with lower-case
> names, and neither has had a user since commit c6594d642717 ("unroll:
> add generic loop unroll helpers") added them in February 2025.
>
> The name unrolled also breaks code that uses it for something else. On
> GCC the macro expands to an empty _Pragma(), so a function parameter
> named unrolled compiles with only -Wunknown-pragmas warnings (errors
> only with CONFIG_WERROR) and silently loses its name:
>
> int add(int unrolled, int x) { return unrolled + x; }
>
> builds as "return x;" with GCC 11 to 16 (GCC 8 to 10 and Clang reject
> it).
>
> Drop both macros, and retitle the kernel-doc comment from unrolled to
> unrolled_count(), the macro its usage example shows. unrolled_full and
> unrolled_count() stay; any clash with their names fails to build
> instead of compiling silently.
>
> Suggested-by: Alexander Lobakin <aleksander.lobakin@xxxxxxxxx>
> Link: https://lore.kernel.org/all/3c25921c-7bdf-4edd-ba06-838dd1765db6@xxxxxxxxx/
> Signed-off-by: Tzu-Ching Yang <shingekinocore@xxxxxxxxx>

Reviewed-by: Eric Biggers <ebiggers@xxxxxxxxxx>

> v2: drop the two unused macros instead of making all three
> function-like (Alexander Lobakin).
> v1: https://lore.kernel.org/all/20261016025613.2690485-1-shingekinocore@xxxxxxxxx/
>
> Eric, this version no longer touches lib/crypto/. Would you still
> take it through libcrypto-next, or should it go through Andrew's -mm
> tree (unroll.h has no MAINTAINERS entry)?

Either way is fine with me. It's one of the unowned files, which are
always problematic. If Andrew hasn't taken it by the time -rc1 rolls
around, I'll apply it to libcrypto-next: it's at least somewhat related,
given that lib/crypto/ is one of the few users of this file.

- Eric