bcm27xx: add kernel 5.10 support
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.10 / 950-0525-dwc-otg-fix-clang-Wpointer-bool-conversion-warning.patch
1 From 58429d46cf9700a9087662633ab71027eeb80bd6 Mon Sep 17 00:00:00 2001
2 From: Jo Henke <37883863+jo-he@users.noreply.github.com>
3 Date: Tue, 6 Apr 2021 11:45:14 +0000
4 Subject: [PATCH] dwc-otg: fix clang -Wpointer-bool-conversion warning
5
6 warning: address of array 'desc->wMaxPacketSize' will always evaluate to 'true'
7
8 The wMaxPacketSize field is actually a two element array which content should
9 be accessed via the UGETW macro.
10 ---
11 drivers/usb/host/dwc_otg/dwc_otg_pcd.c | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14 --- a/drivers/usb/host/dwc_otg/dwc_otg_pcd.c
15 +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd.c
16 @@ -1487,7 +1487,7 @@ int dwc_otg_pcd_ep_enable(dwc_otg_pcd_t
17 num = UE_GET_ADDR(desc->bEndpointAddress);
18 dir = UE_GET_DIR(desc->bEndpointAddress);
19
20 - if (!desc->wMaxPacketSize) {
21 + if (!UGETW(desc->wMaxPacketSize)) {
22 DWC_WARN("bad maxpacketsize\n");
23 retval = -DWC_E_INVALID;
24 goto out;