Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 98f3a1b9 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Felipe Balbi
Browse files

usb: gadget: mass_storage: remove >= 0 check for unsigned type



| 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.

[ mina86@mina86.com : make lun unsigned int and use %u in DBG() macro for it ]

Signed-off-by: default avatarMichal Nazarewicz <mina86@mina86.com>
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent b6424353
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment