linux/drivers/usb/typec
Amelie Delaunay befa1c2d65 usb: typec: stusb160x: fix signedness comparison issue with enum variables
chip->port_type and chip->pwr_opmode are enums and when GCC considers them
as unsigned, the conditions are never met.
This patch takes advantage of the ret variable and fixes the following
warnings:
drivers/usb/typec/stusb160x.c:548 stusb160x_get_fw_caps() warn: unsigned 'chip->port_type' is never less than zero.
drivers/usb/typec/stusb160x.c:570 stusb160x_get_fw_caps() warn: unsigned 'chip->pwr_opmode' is never less than zero.

Fixes: da0cb63100 ("usb: typec: add support for STUSB160x Type-C controller family")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
Link: https://lore.kernel.org/r/20201028163309.12878-1-amelie.delaunay@st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-29 08:26:08 +01:00
..
altmodes usb: typec: displayport: Reduce noise from the driver 2020-10-02 11:30:10 +02:00
mux Merge 5.0-rc6 into usb-next 2020-09-21 09:06:42 +02:00
tcpm usb: typec: tcpm: reset hard_reset_count for any disconnect 2020-10-28 13:20:52 +01:00
ucsi usb: typec: ucsi: Prevent mode overrun 2020-09-16 12:34:10 +02:00
bus.c usb: typec: altmode: Fix typec_altmode_get_partner sometimes returning an invalid pointer 2020-04-22 19:23:19 +02:00
bus.h usb: typec: altmode: Remove the notification chain 2020-02-12 10:51:21 -08:00
class.c usb: typec: add typec_find_pwr_opmode 2020-10-02 15:30:31 +02:00
hd3ss3220.c usb: typec: hd3ss3220: Use OF graph API to get the connector fwnode 2020-10-02 15:28:18 +02:00
Kconfig usb: typec: Add QCOM PMIC typec detection driver 2020-10-09 15:14:43 +02:00
Makefile usb: typec: Add QCOM PMIC typec detection driver 2020-10-09 15:14:43 +02:00
mux.c usb: fix kernel-doc markups 2020-10-28 13:18:56 +01:00
qcom-pmic-typec.c usb: typec: Add QCOM PMIC typec detection driver 2020-10-09 15:14:43 +02:00
stusb160x.c usb: typec: stusb160x: fix signedness comparison issue with enum variables 2020-10-29 08:26:08 +01:00
tps6598x.c usb: typec: Replace HTTP links with HTTPS ones 2020-07-15 16:33:50 +02:00