Hello.

On 03-12-2012 18:32, Sebastian Andrzej Siewior wrote:

| In file included from drivers/usb/gadget/acm_ms.c:43:
| f_mass_storage.c:2199:18: warning: comparison of unsigned expression >= 0 is 
always true  [-Wtautological-compare]
|         if (common->lun >= 0 && common->lun < common->nluns)
|             ~~~~~~~~~~~ ^  ~

common->lun is defined as "unsigned int" so its value is always >= 0.
It is assigned via cbw->Lun which is defined as u8 so it is also not
abused as -1.

[[email protected]: make lun unsigned int and use %u in DBG() macro for it]
Acked-by: Michal Nazarewicz <[email protected]>

Michal, shouldn't you rather sign off on the patch if it includes a chunk from you anyway?

Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
---
v1..v2: add Michal's chunk which converts lun to unsigned int

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to