From patchwork Wed Jul 15 09:32:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 11664611 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 71211138C for ; Wed, 15 Jul 2020 09:34:15 +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 3CD2C206F4 for ; Wed, 15 Jul 2020 09:34:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lqAYlzdQ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="B9eGyNDC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3CD2C206F4 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=qH4pN2cAKdbFQ47QVMvw2+2xfHSekBypyspGFwmE8RM=; b=lqAYlzdQmp+WxrjZc1u3wDuSe 1OBsb+yRtkgk73M3qm5bT/TBJ7kkI1xbFc4xh8jEalOIs/PJ7q+OCflrTjpWSxEKNUiHQsxTWlTOl 0OluN90Qsp+jSk9LSTs3WK3z6OqQj4sLyX+cI9e9OJwOq6J0FuZJcb74lr+/jnmVxxVAm8KKZhORu IPFDjBTVhSgZilm3z82V5tzAbLDlXPq61pA0sdNGLIcAQZDDpSX4m0zisk5xVqtcLnVH2xUlF4W1W uS99tvhINLlNpG2JxeOXOl0yZZVHLy+00n0w/JkudCDK3CDoHKh4QW/qZ3YMspLR0IuUoJ8DG0GET cF+ceGdFw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvdmA-0003QJ-9X; Wed, 15 Jul 2020 09:32:30 +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 1jvdlw-0003Kv-7P for linux-arm-kernel@lists.infradead.org; Wed, 15 Jul 2020 09:32:17 +0000 Received: by mail-wm1-x341.google.com with SMTP id g75so4660127wme.5 for ; Wed, 15 Jul 2020 02:32:16 -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=aGkX+E1EBfqRr0rfaGdLhwyAcBiQ16E9WQER7VbVHB0=; b=B9eGyNDCvcRazQ5Vt4bCO10YvxegSYTM59WaGhCMmKF1ntTqI0zxMbYoNhBkEWX6+u Q/bcBNCzP/NiyAp1huYTJNpJcx0WdrEb56Rkp5DQRWi7GJPA4qNC2nOe1shHedItKyw6 3OrZOdisEymzmeJLiYQ+pmiZ96mEIhootgO4sR9Ci94A0kJzd3MQ7+em+CZmN+XMU0bv Itkn84N4qTA3X3ge6IF1QJwxgLZ5oB523cWAJtAWZa9ztHkAhjwA+FMCGpHv3mFGJeGh bAIgVniOn+Dt6KpDNO9N3MtF4zQRMy+UZcXk9qotI5EeRahzIe/Gmm3D4sIsBdKJt4Km jJXQ== 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=aGkX+E1EBfqRr0rfaGdLhwyAcBiQ16E9WQER7VbVHB0=; b=OTjDd6aGiypwnm96N4ng+J3yPQV4rq2oX7uTvUTpYlx1J6pLjFHDleAMQL30SmZ8QC B9/smeVpMAGUm9bTmaGdNmkyKrhqfhttNoObw4OFmXqgZHPDAuuiuk2PDUQe7SOVnm0w tRT/hLLIw4NcMpFcpd06Gy/bM1etbxKbkNAWM8P4znXrGvIvjwSFT3mZBizBvNh45xr6 0QXpTJAWL6u5Lf7nM6KhCCzbPkgbf+i9wjMuc2CwUOXFRkFJCRq2LrdQiuY8Qx5T52ut fjO1aLSjZFnHqDCY31JcStoB/uwXK9/0LBm/mOojhHoVSsQfFWU9ZKYxAUkScG6YXZCM FLcA== X-Gm-Message-State: AOAM532Vty6kl4yvqkUpEL+v1cC3KjZWpNWolkV5EICd+PpuUZ98I7Wy q0zgENvKP4mXgiCembq6lTSqWw== X-Google-Smtp-Source: ABdhPJzy0kAtC0mAb9N9Nk0jBlEslSi+EyKpZKizI1grPl6nIG7Ij66G9kluURFmeTpNfzFWlDbOcQ== X-Received: by 2002:a05:600c:2050:: with SMTP id p16mr7507657wmg.44.1594805535285; Wed, 15 Jul 2020 02:32:15 -0700 (PDT) Received: from localhost.localdomain ([2.31.163.61]) by smtp.gmail.com with ESMTPSA id s203sm2686991wms.32.2020.07.15.02.32.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2020 02:32:14 -0700 (PDT) From: Lee Jones To: gregkh@linuxfoundation.org Subject: [PATCH v2 2/8] usb: dwc2: gadget: Avoid pointless read of EP control register Date: Wed, 15 Jul 2020 10:32:03 +0100 Message-Id: <20200715093209.3165641-3-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200715093209.3165641-1-lee.jones@linaro.org> References: <20200715093209.3165641-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-20200715_053216_335121_A85E2650 X-CRM114-Status: GOOD ( 10.63 ) 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_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -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: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Ben Dooks , Minas Harutyunyan , Lee Jones , 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 Commit ec1f9d9f01384 ("usb: dwc2: gadget: parity fix in isochronous mode") moved these checks to dwc2_hsotg_change_ep_iso_parity() back in 2015. The assigned value hasn't been read back since. Let's remove the unnecessary H/W read. Fixes the following W=1 warning: drivers/usb/dwc2/gadget.c: In function ‘dwc2_hsotg_epint’: drivers/usb/dwc2/gadget.c:2981:6: warning: variable ‘ctrl’ set but not used [-Wunused-but-set-variable] 2981 | u32 ctrl; | ^~~~ Cc: Ben Dooks Signed-off-by: Lee Jones Acked-by: Minas Harutyunyan --- Changelog v2: No change - added Acked-by drivers/usb/dwc2/gadget.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 03cf1fa856219..5b9d23991c99d 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -2978,10 +2978,8 @@ static void dwc2_hsotg_epint(struct dwc2_hsotg *hsotg, unsigned int idx, u32 epctl_reg = dir_in ? DIEPCTL(idx) : DOEPCTL(idx); u32 epsiz_reg = dir_in ? DIEPTSIZ(idx) : DOEPTSIZ(idx); u32 ints; - u32 ctrl; ints = dwc2_gadget_read_ep_interrupts(hsotg, idx, dir_in); - ctrl = dwc2_readl(hsotg, epctl_reg); /* Clear endpoint interrupts */ dwc2_writel(hsotg, ints, epint_reg);