From patchwork Thu Jul 2 14:46:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 11639215 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D35CC6C1 for ; Thu, 2 Jul 2020 14:55:48 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A4ED320737 for ; Thu, 2 Jul 2020 14:55:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Tt4/JDme"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="MRCLlu77" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A4ED320737 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+ERSS0RCJdLokLs/O67l1/gs3T1SYB/QU3UT10MpEVk=; b=Tt4/JDmeZAZuKkVA+St9r38dI h9q7mU7/yHQYa4U/h0JKBOuNy3b1dbxypfLSJPITRg7fJDqTSLn/1ePMNJYz15ghN7azO0dLTNdBx neAt5yWbZCGNjOfd8QL31144VBwBuL6Rkh2s9G3lJbE6Uxgpql17XDv9q6fGyY5fO361LyoXEeJCB dEkAlxFF958MGolkwBo4ta9ChiJo4YL9Lq5+a9LndcfiZuzdPMfkuHBqBsz1/6c/BJLRHJXG8Q3+t 7Qv7anBaLOn5mGMNVYYu9loBA5DVzScwfcfIyK8YadghXU4itSJsC3BA6qGKUaaqdUB9ZkAt/bh0+ bY7N/GVuw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jr0a9-0000gD-5g; Thu, 02 Jul 2020 14:52:57 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jr0UP-0005Qn-HU for linux-arm-kernel@lists.infradead.org; Thu, 02 Jul 2020 14:47:05 +0000 Received: by mail-wm1-x341.google.com with SMTP id l2so26795114wmf.0 for ; Thu, 02 Jul 2020 07:47:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pP5tNguPzonDyxhQNucE0D3MbWP90cYYUbxgRDFDsUc=; b=MRCLlu77vm2lwEuKfpgTjOHIiNbOSRTeYtgs5c+tcVQF2EOP3Y+PnwvY8yMjo/cJJ9 TpF2T6O2DEjSh+q/g7J04eisB3ct2rVdiBCpsqSLJeVCjttHOc7mvJkWgxLpgTX1G7ih 9zoqFAsZWRUg+4yjqPZtnjfXqRtNRxiUz9bgYGRiZMsU3zRp/oW2DAsNBN8kUjudGQt9 2V6vEeJAtKSdSkRaouvKT1GaOXxATqsbk9o2Agt560AZqfMKPCHBpvFsq9QjR3OwQ2b/ 2wOOxYVGGAVrNGw3vGhZgQmcSwGG/WaDTMsIgDN0ckGLgqnUhN6oSdWcJu49hXBTt01a 6Kqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pP5tNguPzonDyxhQNucE0D3MbWP90cYYUbxgRDFDsUc=; b=D9LgvPuob24UuoIfQ8h/Ri0E872GHXp9cGsfVErdKDEx34QJI02nk95o7LhiTfFx+2 kIwWDV+91bggbGMFVuK/aD/XF6ybuN0Fy+6skG6iANBgLilal3zVPnZmQntFPucB7Ws7 Q2fYW5yfy3IuuSZih5cQpURgBiGWQWtP/P4u73DvBhIWpL2eJ57D4eCWM7zJns/3DfNI 7FaUpkmARVMpH+9Hy+JfzAstB6ggle3iKxkm4Rv2+q3dMCfy2qMxMkASPOTAMQlI1GQm 1BDH5LUQw04J5Cgjyas23EU4KuKHUJT7M20DsqsuQ6PXEK4UpLVJimAlTokVND1tM7Zh IDmw== X-Gm-Message-State: AOAM531saydJc4s6W45rWsU9aOoLyqAJJcjz05L/0WA9kFtK326Rf6TM 7O0LSRcmkWH5Od4MJf6DU0hZHdBmY0E= X-Google-Smtp-Source: ABdhPJyyBq6LXHLryVvWu+HFwT4JhZivbWn1QGWohZ3dXSZK0sYsC9OCCnVcIDtulXLnqPhVrsy2hQ== X-Received: by 2002:a1c:49d7:: with SMTP id w206mr30883650wma.181.1593701220039; Thu, 02 Jul 2020 07:47:00 -0700 (PDT) Received: from localhost.localdomain ([2.27.35.144]) by smtp.gmail.com with ESMTPSA id g14sm7002737wrw.83.2020.07.02.07.46.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 07:46:59 -0700 (PDT) From: Lee Jones To: gregkh@linuxfoundation.org Subject: [PATCH 23/30] usb: host: oxu210hp-hcd: Move declaration of 'qtd' into 'ifdef OXU_URB_TRACE' Date: Thu, 2 Jul 2020 15:46:18 +0100 Message-Id: <20200702144625.2533530-24-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200702144625.2533530-1-lee.jones@linaro.org> References: <20200702144625.2533530-1-lee.jones@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200702_104701_758274_A99346D1 X-CRM114-Status: GOOD ( 12.06 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:341 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lee Jones , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada , "Eurotech S.p.A" , Rodolfo Giometti , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org If we assign 'epnum' during the declaration we can also avoid "ISO C90 forbids mixed declarations" issues. So it does looks like we can have our cake and eat it in this scenario. Fixes the following W=1 kernel build warning(s): drivers/usb/host/oxu210hp-hcd.c: In function ‘submit_async’: drivers/usb/host/oxu210hp-hcd.c:2040:19: warning: variable ‘qtd’ set but not used [-Wunused-but-set-variable] 2040 | struct ehci_qtd *qtd; | ^~~ Cc: Masahiro Yamada Cc: Rodolfo Giometti Cc: "Eurotech S.p.A" Signed-off-by: Lee Jones --- drivers/usb/host/oxu210hp-hcd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c index 120666a0d5901..b00673295c9fe 100644 --- a/drivers/usb/host/oxu210hp-hcd.c +++ b/drivers/usb/host/oxu210hp-hcd.c @@ -2037,16 +2037,15 @@ static struct ehci_qh *qh_append_tds(struct oxu_hcd *oxu, static int submit_async(struct oxu_hcd *oxu, struct urb *urb, struct list_head *qtd_list, gfp_t mem_flags) { - struct ehci_qtd *qtd; - int epnum; + int epnum = urb->ep->desc.bEndpointAddress; unsigned long flags; struct ehci_qh *qh = NULL; int rc = 0; +#ifdef OXU_URB_TRACE + struct ehci_qtd *qtd; qtd = list_entry(qtd_list->next, struct ehci_qtd, qtd_list); - epnum = urb->ep->desc.bEndpointAddress; -#ifdef OXU_URB_TRACE oxu_dbg(oxu, "%s %s urb %p ep%d%s len %d, qtd %p [qh %p]\n", __func__, urb->dev->devpath, urb, epnum & 0x0f, (epnum & USB_DIR_IN) ? "in" : "out",