From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.codeaurora.org by pdx-caf-mail.web.codeaurora.org (Dovecot) with LMTP id /cZLHxJrHltEOgAAmS7hNA ; Mon, 11 Jun 2018 12:30:59 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id D65BE608FD; Mon, 11 Jun 2018 12:30:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by smtp.codeaurora.org (Postfix) with ESMTP id F2FCC60918; Mon, 11 Jun 2018 12:30:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org F2FCC60918 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932947AbeFKMax (ORCPT + 21 others); Mon, 11 Jun 2018 08:30:53 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:44923 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S932776AbeFKMaw (ORCPT ); Mon, 11 Jun 2018 08:30:52 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 7D62020318445; Mon, 11 Jun 2018 20:30:46 +0800 (CST) Received: from [127.0.0.1] (10.142.68.147) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.382.0; Mon, 11 Jun 2018 20:30:47 +0800 Subject: Re: [PATCH v2] usb: xhci: remove the code build warning To: , , , , , , References: <20180606143659.1476-1-gengdongjiu@huawei.com> From: gengdongjiu Message-ID: Date: Mon, 11 Jun 2018 20:30:27 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180606143659.1476-1-gengdongjiu@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.142.68.147] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mathias, This patch is ready to apply, It is great that this patch can be applied to 4.18. thanks a lot. On 2018/6/6 22:36, Dongjiu Geng wrote: > Initialize the 'err' variate to remove the build warning, > the warning is shown as below: > > drivers/usb/host/xhci-tegra.c: In function 'tegra_xusb_mbox_thread': > drivers/usb/host/xhci-tegra.c:552:6: warning: 'err' may be used uninitialized in this function [-Wuninitialized] > drivers/usb/host/xhci-tegra.c:482:6: note: 'err' was declared here > > Signed-off-by: Dongjiu Geng > Acked-by: Thierry Reding > --- > How to reproduce: > 1. make defconfig ARCH=arm > 2. make -j100 CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm > > Then you can see below warnings: > drivers/usb/host/xhci-tegra.c: In function 'tegra_xusb_mbox_thread': > drivers/usb/host/xhci-tegra.c:552:6: warning: 'err' may be used uninitialized in this function [-Wuninitialized] > drivers/usb/host/xhci-tegra.c:482:6: note: 'err' was declared here > --- > drivers/usb/host/xhci-tegra.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c > index a8c1d07..d50549f 100644 > --- a/drivers/usb/host/xhci-tegra.c > +++ b/drivers/usb/host/xhci-tegra.c > @@ -481,7 +481,7 @@ static void tegra_xusb_mbox_handle(struct tegra_xusb *tegra, > unsigned long mask; > unsigned int port; > bool idle, enable; > - int err; > + int err = 0; > > memset(&rsp, 0, sizeof(rsp)); > >