[lvc-project] [PATCH] sort.h: hoist cmp_int() into generic header file

Kent Overstreet kent.overstreet at linux.dev
Sun Apr 27 23:50:02 MSK 2025


On Sun, Apr 27, 2025 at 11:14:49PM +0300, Fedor Pchelkin wrote:
> Deduplicate the same functionality implemented in several places by
> moving the cmp_int() helper macro into linux/sort.h.
> 
> The macro performs a three-way comparison of the arguments mostly useful
> in different sorting strategies and algorithms.
> 
> Suggested-by: Darrick J. Wong <djwong at kernel.org>
> Signed-off-by: Fedor Pchelkin <pchelkin at ispras.ru>

Acked-by: Kent Overstreet <kent.overstreet at linux.dev>



More information about the lvc-project mailing list