]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ttm: fix the type mismatch error on sparc64
authorHuang Rui <ray.huang@amd.com>
Tue, 7 Sep 2021 10:03:02 +0000 (18:03 +0800)
committerChristian König <christian.koenig@amd.com>
Wed, 15 Sep 2021 08:18:27 +0000 (10:18 +0200)
commit48717d6e87f7e30cd80f88a44ee49c2b75801e33
tree0b31fa1652601fdc53a67f46b82929ae309801c5
parentb7ae7938141dc009bcc0095a7f77d3289e69d644
drm/ttm: fix the type mismatch error on sparc64

__fls() on sparc64 return "int", but here it is expected as "unsigned
long" (x86). It will cause the build errors because the warning becomes
fatal while it is using sparc configuration. As suggested by Linus, it
can use min_t instead of min to force the type as "unsigned int".

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210907100302.3684453-1-ray.huang@amd.com
drivers/gpu/drm/ttm/ttm_pool.c