Thread (4 messages) 4 messages, 4 authors, 2018-02-09

Re: ocxl: fix signed comparison with less than zero

From: Michael Ellerman <hidden>
Date: 2018-02-09 04:00:33
Also in: kernel-janitors, lkml

On Tue, 2018-01-30 at 15:11:44 UTC, Colin King wrote:
From: Colin Ian King <redacted>

Currently the comparison of used < 0 is always false because
uses is a size_t. Fix this by making used a ssize_t type.

Detected by Coccinelle:
drivers/misc/ocxl/file.c:320:6-10: WARNING: Unsigned expression
compared with zero: used < 0

Fixes: 5ef3166e8a32 ("ocxl: Driver code for 'generic' opencapi devices")
Signed-off-by: Colin Ian King <redacted>
Acked-by: Andrew Donnellan <redacted>
Acked-by: Frederic Barrat <redacted>
Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/dedab7f0d3137441a97fe7cf9b9ca5

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help