Re: [PATCH][next] scsi: lpfc: fix less than zero comparison on unsigned int computation

2020-07-06 Thread James Smart
On 7/6/2020 6:08 AM, Colin King wrote: From: Colin Ian King The expressions start_idx - dbg_cnt is evaluated using unsigned int arthithmetic (since these variables are unsigned ints) and hence can never be less than zero, so the less than comparison is never true. Re-write the expression to c

[PATCH][next] scsi: lpfc: fix less than zero comparison on unsigned int computation

2020-07-06 Thread Colin King
From: Colin Ian King The expressions start_idx - dbg_cnt is evaluated using unsigned int arthithmetic (since these variables are unsigned ints) and hence can never be less than zero, so the less than comparison is never true. Re-write the expression to check for start_idx being less than dbg_cnt.