From: Greg Kroah-Hartman Date: Thu, 30 Apr 2020 13:10:22 +0000 (+0200) Subject: 4.4-stable patches X-Git-Tag: v5.4.37~48 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=36634552199517dce3e63c3150a8c59a5e3cfe67;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: usb-gadget-udc-bdc-remove-unnecessary-null-checks-in-bdc_req_complete.patch --- diff --git a/queue-4.4/series b/queue-4.4/series index 3b062f050fc..78158ad132a 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -55,3 +55,4 @@ remoteproc-fix-wrong-rvring-index-computation.patch sctp-use-right-member-as-the-param-of-list_for_each_entry.patch fuse-fix-possibly-missed-wake-up-after-abort.patch mtd-cfi-fix-deadloop-in-cfi_cmdset_0002.c-do_write_buffer.patch +usb-gadget-udc-bdc-remove-unnecessary-null-checks-in-bdc_req_complete.patch diff --git a/queue-4.4/usb-gadget-udc-bdc-remove-unnecessary-null-checks-in-bdc_req_complete.patch b/queue-4.4/usb-gadget-udc-bdc-remove-unnecessary-null-checks-in-bdc_req_complete.patch new file mode 100644 index 00000000000..f678638967d --- /dev/null +++ b/queue-4.4/usb-gadget-udc-bdc-remove-unnecessary-null-checks-in-bdc_req_complete.patch @@ -0,0 +1,47 @@ +From 09b04abb70f096333bef6bc95fa600b662e7ee13 Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Sat, 28 Mar 2020 18:12:46 -0700 +Subject: usb: gadget: udc: bdc: Remove unnecessary NULL checks in bdc_req_complete + +From: Nathan Chancellor + +commit 09b04abb70f096333bef6bc95fa600b662e7ee13 upstream. + +When building with Clang + -Wtautological-pointer-compare: + +drivers/usb/gadget/udc/bdc/bdc_ep.c:543:28: warning: comparison of +address of 'req->queue' equal to a null pointer is always false +[-Wtautological-pointer-compare] + if (req == NULL || &req->queue == NULL || &req->usb_req == NULL) + ~~~~~^~~~~ ~~~~ +drivers/usb/gadget/udc/bdc/bdc_ep.c:543:51: warning: comparison of +address of 'req->usb_req' equal to a null pointer is always false +[-Wtautological-pointer-compare] + if (req == NULL || &req->queue == NULL || &req->usb_req == NULL) + ~~~~~^~~~~~~ ~~~~ +2 warnings generated. + +As it notes, these statements will always evaluate to false so remove +them. + +Fixes: efed421a94e6 ("usb: gadget: Add UDC driver for Broadcom USB3.0 device controller IP BDC") +Link: https://github.com/ClangBuiltLinux/linux/issues/749 +Signed-off-by: Nathan Chancellor +Signed-off-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/gadget/udc/bdc/bdc_ep.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/gadget/udc/bdc/bdc_ep.c ++++ b/drivers/usb/gadget/udc/bdc/bdc_ep.c +@@ -546,7 +546,7 @@ static void bdc_req_complete(struct bdc_ + { + struct bdc *bdc = ep->bdc; + +- if (req == NULL || &req->queue == NULL || &req->usb_req == NULL) ++ if (req == NULL) + return; + + dev_dbg(bdc->dev, "%s ep:%s status:%d\n", __func__, ep->name, status);