Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4001208imm; Mon, 11 Jun 2018 05:31:31 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJGSxesxKLdhX+Ryk3LVgU5D84aFgdoOaJrHJWvrOxiZK0ltdHRuVcf/b9wGhDNE1HfnP5O X-Received: by 2002:a65:4c4d:: with SMTP id l13-v6mr14986298pgr.211.1528720291654; Mon, 11 Jun 2018 05:31:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528720291; cv=none; d=google.com; s=arc-20160816; b=EVHjbFgCSjN6LcKBb/5L2mr7KBKVD63X+gGMQuMfZkq/J3zGX2IUt4VGEaCqtE56zu x+dqPyELbKnIy95Vkif768JvlwTMsCk5QrPavGA1MmQJaZqsQb8wVpwZAvdH5eXE0hit auFCOxLyticQRnjCv8XbrYwh6wgOuiEYU4JF884MRtF0iOZhoceFHN6N/x9nwEzpTiws gGkpXCQxWVrXgvRLDWBRbw3QQ3zR/rYJnj1QDvYOQKJngEKkspS+fJjBpgZhfUXPbf/V cpJ5WUQImwBlmPN7QEflmNBhzNBkxwJNlbooi4d/PRD2aCuvAP+724JugfzCXxisGIV4 GmIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:arc-authentication-results; bh=sQC9fQH/QvF/il++diyM8LdXrl5zZ8Qp1immg7XAN3Q=; b=HS1Z8e8pKX0iZ1NWuHppXANG0BB7qMILVaGF8GQRX6ZzFEFRYB/6yD2Ss/JhjFrCsb 2xaLSsb8hYmAngd/csp+kjXGw+isMQvCsR1QI7+jjmvYmB1JjHqFBXrj+WOHDkekkAVh hnxlgD/fxtuFP12ylwWePAF97vVtJb3suT5pHgme/tna21RviQLJ6q+EQSxniX4tlR5a 6gPN2zJqTGza1WpbGI0M6D6Myp6dBHaJL989O+C7kSk+GpYgRv7oJLov1WtewyZGQP0d cvAbT+PVk0bSvznRbLLxAHajpKlpXvdMlBKMTYINd8PschGMKlU75xHyt8idm2AuLkxA SALw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l13-v6si17946202pff.261.2018.06.11.05.31.16; Mon, 11 Jun 2018 05:31:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932942AbeFKMax (ORCPT + 99 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)); > >