Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2462262imm; Sat, 16 Jun 2018 19:31:43 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI/ctJWcdiPRZ6dQok6zCcB+xMFncQC9w9VSZL5bk3mSUZ++k8ePBo8w1xVhplcmaXTFa++ X-Received: by 2002:a17:902:bc4c:: with SMTP id t12-v6mr8439527plz.177.1529202703058; Sat, 16 Jun 2018 19:31:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529202703; cv=none; d=google.com; s=arc-20160816; b=kY17G2CUV1H6Oo7VoEIFce8IpTrP97h/NHCNIHRPY3EjB0bBpzC1lc8i6twUBaHzoa 8i4J3nuwqEXFuMVVRzu0yu6HZoos2Hk+YwnQgk6nt1Gy7DsKOqgAuXr0vgT9bHGPDRSP IUMyOszVqNz72/A8LHy0QrYAUe0OeJcutpJZUNq/VLx9Ef2PaRS+iA54AaDoHxwwibev YjfaW4f3q1oa8rMiU8z9MK63GnpLUip425JfxjracQpWae3ACXWqH+JdVN0hCibEcWKi j+471CF17pZtwWS4nusc+EsS5KCRPN7ldJMfyWJeM+4qnJ0bq2kg+0owiEhpYTGNQuO+ XufQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=ntwQorB60UwjpXSbQV3P2DF+e0CJoSTxNjKb1e05in8=; b=iXQezxdPJ48b7X1tP7iYAnYvrHAf0NtwIiWDRzv260KL1QGp+sZhtT6XEozPl2F+kt xUR6tNrrDtbsbn+bMSOMxEs7L7DjRhkgJOMz6xt7Y7Kt84vPi98/6NHT37BALvkf8CuE M76RvgUEx29PV+MB2IfSl53Pn/umpwFEji+dF9C0strt8Gsrf+GF9GGiKA0BQHzYIDkn yO4lmF2XuqAGfWUgg/uqpS55LNyL6w/UHb9S5xNsfWt5eqQrSB2cu93cj0WE++HKuv1/ 2vvtWER4zxYS9qgJuE8Gs6108ZV7p6P++BWt/koMj38ec2Y7etM5hAkPeenQijyKbaUu QuBQ== 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 n23-v6si9408568pgc.366.2018.06.16.19.31.24; Sat, 16 Jun 2018 19:31:43 -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 S933530AbeFQCbA (ORCPT + 99 others); Sat, 16 Jun 2018 22:31:00 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:8717 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756946AbeFQCa7 (ORCPT ); Sat, 16 Jun 2018 22:30:59 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 377CCDF736133; Sun, 17 Jun 2018 10:30:44 +0800 (CST) Received: from SHA150392835-N.china.huawei.com (10.45.50.98) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.382.0; Sun, 17 Jun 2018 10:30:39 +0800 From: Dongjiu Geng To: , , , , , , CC: Subject: [PATCH v3] usb: xhci: remove the code build warning Date: Sun, 17 Jun 2018 10:30:18 +0800 Message-ID: <20180617023018.7952-1-gengdongjiu@huawei.com> X-Mailer: git-send-email 2.11.0.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.45.50.98] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- change since v1: 1. Add '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)); -- 1.9.1