The subtraction is done against uint64_t values, yet the return value of
the function is int. The function doesn't care about the offset between
the indexes, it just care about whether the returned value is less, equal
or greater than 0.
Rework the code so the function only returns -1, 0 or 1, and hence there's
no truncation of the return value.
Fixes: 78eb32933bb3 ("xen: add a grant-table user-space device")
Sponsored by: Advanced Micro Devices, Inc.
MFC after: 1 week