diff options
author | Rouven Czerwinski <r.czerwinski@pengutronix.de> | 2021-06-17 19:00:19 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-06-21 06:34:08 +0200 |
commit | ed44c386eb24782755a171720f7d3dc34776d9fa (patch) | |
tree | b78f0037c6c70b855dff4bf522ca01195fa8a3ff /drivers/usb | |
parent | cee2e7acd1119dcbb123c903a5555ef660e7d643 (diff) | |
download | barebox-ed44c386eb24782755a171720f7d3dc34776d9fa.tar.gz barebox-ed44c386eb24782755a171720f7d3dc34776d9fa.tar.xz |
usb: usb251xb: remove >=0 check for u32 port
The compiler rightfully complains:
drivers/usb/misc/usb251xb.c: In function ‘usb251xb_get_ofdata’:
drivers/usb/misc/usb251xb.c:563:13: warning: comparison of unsigned expression in ‘>= 0’ is always true [-Wtype-limits]
563 | if ((port >= 0) && (port <= data->port_cnt))
so drop the check.
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Link: https://lore.barebox.org/20210617170018.42823-1-r.czerwinski@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/misc/usb251xb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c index 10d5aa310b..e282988fb4 100644 --- a/drivers/usb/misc/usb251xb.c +++ b/drivers/usb/misc/usb251xb.c @@ -560,7 +560,7 @@ static int usb251xb_get_ofdata(struct usb251xb *hub, */ hub->port_swap = USB251XB_DEF_PORT_SWAP; of_property_for_each_u32(np, "swap-dx-lanes", prop, p, port) { - if ((port >= 0) && (port <= data->port_cnt)) + if (port <= data->port_cnt) hub->port_swap |= BIT(port); } |