From patchwork Thu Nov 24 11:16:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 83857 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp78076qgi; Thu, 24 Nov 2016 03:16:42 -0800 (PST) X-Received: by 10.99.49.213 with SMTP id x204mr3261708pgx.92.1479986202446; Thu, 24 Nov 2016 03:16:42 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d9si38896952pge.35.2016.11.24.03.16.42; Thu, 24 Nov 2016 03:16:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965077AbcKXLQa (ORCPT + 4 others); Thu, 24 Nov 2016 06:16:30 -0500 Received: from mail-pg0-f49.google.com ([74.125.83.49]:35271 "EHLO mail-pg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938655AbcKXLQ2 (ORCPT ); Thu, 24 Nov 2016 06:16:28 -0500 Received: by mail-pg0-f49.google.com with SMTP id p66so17797845pga.2 for ; Thu, 24 Nov 2016 03:16:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=Z5vetGHESPftfnlEbcHsMUkjkVba3cjjuVJwez/tAR4=; b=I3oPdbnA1aRKx3M4dtfIprooA+UxBNn58K1diMSC7uDmdoMRlZ3BpjTAhwc+nNfrjT 2QtEe5YuZHLJjM3t21R367HP0OiRemz6gR2gpYRs6RI9CTe5Joojv1ZoIaOmV5R6SpUv i3GcA9BWRPirstoAGlahfJAvI1mcZm4PjT+fs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Z5vetGHESPftfnlEbcHsMUkjkVba3cjjuVJwez/tAR4=; b=VTfit3W0dNhB29Ew9+Gj9RGfN9yYieyA/zvZBCTxeottHeXiM6wJZ9FN740mvVsnwM Sn/Le+BcfZck+CBzSg4p7zoWIIKqCq2DfrEUHvlt89VIzUYl3FrncA1/D7fP07XyvOO+ lg91/aF5DpIQoWBKhd7yyichPHRSaIeeJDQDSQOGu4Mz2pdZC9X96610A5dSs0DA6Wlu blummhzInZEovc1KoR03cFlDsPVw3r6sw9w9nCfmq5Myp4FDpvbDBLGYmHenK3KhgPpg smxQ3Ok7x34C+m5GBOEmJoQG33fsRTIrNjt+lTUYHudGl7wOIKD8TlnloiBgFxAhJhFf Z4vA== X-Gm-Message-State: AKaTC03xmNef6CBenaB2xZAFKmNZAV2e52WK9HdaQGafG/xNMN4xfh0EsLACJczCe7by4pnt X-Received: by 10.98.210.10 with SMTP id c10mr1784542pfg.23.1479986187382; Thu, 24 Nov 2016 03:16:27 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([175.111.195.49]) by smtp.gmail.com with ESMTPSA id x4sm41770282pgc.14.2016.11.24.03.16.24 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 24 Nov 2016 03:16:26 -0800 (PST) From: Baolin Wang To: mathias.nyman@intel.com, gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, broonie@kernel.org, baolin.wang@linaro.org Subject: [PATCH v2] usb: xhci: Remove unuseful 'return' and 'break' statement Date: Thu, 24 Nov 2016 19:16:15 +0800 Message-Id: <5788dd3650bed67a1551e209847ecdf732eb745b.1479986112.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Since these 'return' statements are not generally useful in void function, remove them. Also remove one unuseful 'break' statement in xhci_setup_addressable_virt_dev() function. Signed-off-by: Baolin Wang --- Changes since v1: - Add description of removing 'break' statement in commitlog. --- drivers/usb/host/xhci-hub.c | 2 -- drivers/usb/host/xhci-mem.c | 1 - drivers/usb/host/xhci-ring.c | 4 ---- drivers/usb/host/xhci.c | 3 --- 4 files changed, 10 deletions(-) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 0ef1690..470ad66 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c @@ -444,8 +444,6 @@ void xhci_ring_device(struct xhci_hcd *xhci, int slot_id) xhci_ring_ep_doorbell(xhci, slot_id, i, 0); } } - - return; } static void xhci_disable_port(struct usb_hcd *hcd, struct xhci_hcd *xhci, diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 48a26d378..d6f59a3 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -1146,7 +1146,6 @@ int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *ud case USB_SPEED_WIRELESS: xhci_dbg(xhci, "FIXME xHCI doesn't support wireless speeds\n"); return -EINVAL; - break; default: /* Speed was set earlier, this shouldn't happen. */ return -EINVAL; diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index d415911..2057d08 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -157,7 +157,6 @@ static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring) ring->deq_seg = ring->deq_seg->next; ring->dequeue = ring->deq_seg->trbs; } - return; } /* @@ -1167,7 +1166,6 @@ static void xhci_handle_cmd_config_ep(struct xhci_hcd *xhci, int slot_id, ring_doorbell_for_active_rings(xhci, slot_id, ep_index); return; } - return; } static void xhci_handle_cmd_reset_dev(struct xhci_hcd *xhci, int slot_id, @@ -1258,7 +1256,6 @@ static void xhci_handle_stopped_cmd_ring(struct xhci_hcd *xhci, mod_timer(&xhci->cmd_timer, jiffies + XHCI_CMD_DEFAULT_TIMEOUT); xhci_ring_cmd_db(xhci); } - return; } @@ -1307,7 +1304,6 @@ void xhci_handle_command_timeout(unsigned long data) xhci_dbg(xhci, "Command timeout on stopped ring\n"); xhci_handle_stopped_cmd_ring(xhci, xhci->current_cmd); spin_unlock_irqrestore(&xhci->lock, flags); - return; } static void handle_cmd_completion(struct xhci_hcd *xhci, diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index cf30cb6..dc337b3 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -269,8 +269,6 @@ static void xhci_free_irq(struct xhci_hcd *xhci) return; if (pdev->irq > 0) free_irq(pdev->irq, xhci_to_hcd(xhci)); - - return; } /* @@ -351,7 +349,6 @@ static void xhci_cleanup_msix(struct xhci_hcd *xhci) } hcd->msix_enabled = 0; - return; } static void __maybe_unused xhci_msix_sync_irqs(struct xhci_hcd *xhci)