From patchwork Mon Apr 15 17:36:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Stern X-Patchwork-Id: 10901285 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ABBF9922 for ; Mon, 15 Apr 2019 17:37:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E6AA284E8 for ; Mon, 15 Apr 2019 17:37:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D93928960; Mon, 15 Apr 2019 17:37:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22340284E8 for ; Mon, 15 Apr 2019 17:37:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727997AbfDORg7 (ORCPT ); Mon, 15 Apr 2019 13:36:59 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:39820 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1727490AbfDORg7 (ORCPT ); Mon, 15 Apr 2019 13:36:59 -0400 Received: (qmail 5931 invoked by uid 2102); 15 Apr 2019 13:36:58 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 15 Apr 2019 13:36:58 -0400 Date: Mon, 15 Apr 2019 13:36:58 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Felipe Balbi cc: USB list Subject: [PATCH] USB: UDC: net2280: Remove redundant "if" condition Message-ID: MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The net2280 driver includes an unnecessary test for an endpoint's queue being empty. The test is redundant; it sits inside a conditional block of an "if" statement which already tests the endpoint's queue. This patch removes the redundant test. Signed-off-by: Alan Stern --- [as1888] drivers/usb/gadget/udc/net2280.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: usb-devel/drivers/usb/gadget/udc/net2280.c =================================================================== --- usb-devel.orig/drivers/usb/gadget/udc/net2280.c +++ usb-devel/drivers/usb/gadget/udc/net2280.c @@ -1057,7 +1057,7 @@ net2280_queue(struct usb_ep *_ep, struct /* PIO ... stuff the fifo, or unblock it. */ if (ep->is_in) write_fifo(ep, _req); - else if (list_empty(&ep->queue)) { + else { u32 s; /* OUT FIFO might have packet(s) buffered */