Re: [PATCH][next] drm/i915/xelpd: Fix unsigned compared to less than zero error

2021-07-20 Thread Lucas De Marchi
On Tue, Jul 20, 2021 at 04:57:26PM +0100, Colin King wrote: From: Colin Ian King The subtraction of fw->size - offset is operating on two unsigned integers and the result is unsigned and hence the less than zero comparison will always to be false. Fix this by casting fw->size from a size_t to a

[PATCH][next] drm/i915/xelpd: Fix unsigned compared to less than zero error

2021-07-20 Thread Colin King
From: Colin Ian King The subtraction of fw->size - offset is operating on two unsigned integers and the result is unsigned and hence the less than zero comparison will always to be false. Fix this by casting fw->size from a size_t to a ssize_t to ensure the result can be signed to allow a less th