Re: [PATCH][next] drm/mm/selftests: fix unsigned comparison with less than zero

2020-06-21 Thread Nirmoy
On 6/18/20 12:39 PM, Dan Carpenter wrote: On Wed, Jun 17, 2020 at 04:59:59PM +0100, Colin King wrote: From: Colin Ian King Function get_insert_time can return error values that are cast to a u64. The checks of insert_time1 and insert_time2 check for the errors but because they are u64 variab

Re: [PATCH][next] drm/mm/selftests: fix unsigned comparison with less than zero

2020-06-21 Thread Christian König
Am 17.06.20 um 17:59 schrieb Colin King: From: Colin Ian King Function get_insert_time can return error values that are cast to a u64. The checks of insert_time1 and insert_time2 check for the errors but because they are u64 variables the check for less than zero can never be true. Fix this by

Re: [PATCH][next] drm/mm/selftests: fix unsigned comparison with less than zero

2020-06-18 Thread Dan Carpenter
On Wed, Jun 17, 2020 at 04:59:59PM +0100, Colin King wrote: > From: Colin Ian King > > Function get_insert_time can return error values that are cast > to a u64. The checks of insert_time1 and insert_time2 check for > the errors but because they are u64 variables the check for less > than zero ca

[PATCH][next] drm/mm/selftests: fix unsigned comparison with less than zero

2020-06-17 Thread Colin King
From: Colin Ian King Function get_insert_time can return error values that are cast to a u64. The checks of insert_time1 and insert_time2 check for the errors but because they are u64 variables the check for less than zero can never be true. Fix this by casting the value to s64 to allow of the ne