drm/xe/gt: Fix min() with u32 and u64
authorLucas De Marchi <lucas.demarchi@intel.com>
Thu, 22 Dec 2022 21:58:12 +0000 (13:58 -0800)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 12 Dec 2023 19:06:01 +0000 (14:06 -0500)
commit2c3878820bf0bbd659c2b897add8a011b5e9f2e1
treec3b1487ea248b7af9abd9bc6a277a99b415d6ac2
parentebec269c522fc9bb48d11b65456b01adbdecb97d
drm/xe/gt: Fix min() with u32 and u64

Fix the following error while building for 32b:

In file included from ../drivers/gpu/drm/xe/xe_gt.c:6:
../drivers/gpu/drm/xe/xe_gt.c: In function ‘gt_ttm_mgr_init’:
../include/linux/minmax.h:20:35: error: comparison of distinct pointer types lacks a cast [-Werror]
   20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
      |                                   ^~

Cast it to u64 so size of the second operand matches the first one when
building it for 32 bits.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_gt.c