[PATCH] riscv: module: Use generic cmp_int() instead of custom cmp_3way()

Paul Walmsley pjw at kernel.org
Tue May 19 14:29:27 PDT 2026


On Tue, 12 May 2026, Florian Schmaus wrote:

> The module-sections.c file defines a custom cmp_3way() macro to perform
> 3-way comparisons during relocation sorting.
> 
> Instead of maintaining our own implementation, use the generic
> cmp_int() macro provided by the already included <linux/sort.h>. This
> removes redundant code and relies on standard kernel interfaces.
> 
> Signed-off-by: Florian Schmaus <florian.schmaus at codasip.com>

Thanks, queued for v7.2.  Looks like arm, arm64, and loongarch have the 
same problem.  Care to fix those too (in separate patches)?


- Paul



More information about the linux-riscv mailing list