Re: [patch] mvsas: don't allow negative timeouts

2015-11-13 Thread Jinpu Wang
On Fri, Nov 13, 2015 at 3:23 PM, Dan Carpenter wrote: > There is a static checker warning here because "val" is controlled by > the user and we have a upper bound on it but allow negative numbers. > "val" appears to be a timeout in usec so this bug probably means we >

Re: [patch] mvsas: don't allow negative timeouts

2015-11-13 Thread Martin K. Petersen
> "Dan" == Dan Carpenter writes: Dan> There is a static checker warning here because "val" is controlled Dan> by the user and we have a upper bound on it but allow negative Dan> numbers. "val" appears to be a timeout in usec so this bug Dan> probably means we have

[patch] mvsas: don't allow negative timeouts

2015-11-13 Thread Dan Carpenter
There is a static checker warning here because "val" is controlled by the user and we have a upper bound on it but allow negative numbers. "val" appears to be a timeout in usec so this bug probably means we have a longer timeout than we should. Let's fix this by changing "val" to unsigned.