Commit 3b583adf authored by Fedor Pchelkin's avatar Fedor Pchelkin Committed by Carlos Maiolino
Browse files

xfs: refactor cmp_two_keys routines to take advantage of cmp_int()



The net value of these functions is to determine the result of a
three-way-comparison between operands of the same type.

Simplify the code using cmp_int() to eliminate potential errors with
opencoded casts and subtractions. This also means we can change the return
value type of cmp_two_keys routines from int64_t to int and make the
interface a bit clearer.

Found by Linux Verification Center (linuxtesting.org).

Suggested-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarFedor Pchelkin <pchelkin@ispras.ru>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarCarlos Maiolino <cem@kernel.org>
parent 82b63ee1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment