From patchwork Sat Oct 6 02:23:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10629059 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 05011933 for ; Sat, 6 Oct 2018 02:11:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E6BFE29969 for ; Sat, 6 Oct 2018 02:11:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA6172996C; Sat, 6 Oct 2018 02:11:43 +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 66F3329969 for ; Sat, 6 Oct 2018 02:11:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729419AbeJFJNH (ORCPT ); Sat, 6 Oct 2018 05:13:07 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:13200 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726505AbeJFJNH (ORCPT ); Sat, 6 Oct 2018 05:13:07 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id F2EB3229ADFD1; Sat, 6 Oct 2018 10:11:37 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.399.0; Sat, 6 Oct 2018 10:11:32 +0800 From: YueHaibing To: Greg Kroah-Hartman , Andrew Morton , Stephen Rothwell , "Mike Rapoport" , Lu Baolu CC: YueHaibing , , Subject: [PATCH -next] usb/early: remove set but not used variable 'remain_length' Date: Sat, 6 Oct 2018 02:23:01 +0000 Message-ID: <1538792581-192494-1-git-send-email-yuehaibing@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected 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 Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/early/xhci-dbc.c: In function 'xdbc_handle_tx_event': drivers/usb/early/xhci-dbc.c:720:9: warning: variable 'remain_length' set but not used [-Wunused-but-set-variable] It never be used since introduction in commit aeb9dd1de98c ("usb/early: Add driver for xhci debug capability") Signed-off-by: YueHaibing --- drivers/usb/early/xhci-dbc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c index 9d4ee88..d2652dc 100644 --- a/drivers/usb/early/xhci-dbc.c +++ b/drivers/usb/early/xhci-dbc.c @@ -717,17 +717,14 @@ static void xdbc_handle_port_status(struct xdbc_trb *evt_trb) static void xdbc_handle_tx_event(struct xdbc_trb *evt_trb) { - size_t remain_length; u32 comp_code; int ep_id; comp_code = GET_COMP_CODE(le32_to_cpu(evt_trb->field[2])); - remain_length = EVENT_TRB_LEN(le32_to_cpu(evt_trb->field[2])); ep_id = TRB_TO_EP_ID(le32_to_cpu(evt_trb->field[3])); switch (comp_code) { case COMP_SUCCESS: - remain_length = 0; case COMP_SHORT_PACKET: break; case COMP_TRB_ERROR: