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: 235580 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp453021ilg; Wed, 15 Jul 2020 02:32:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrUyTrKJ+RWnQQvk9Sc2pWVpx7As6jVcn39ec1pUxEDKAhheelnkle6Eb8j+DVLL1MEBpT X-Received: by 2002:a50:d908:: with SMTP id t8mr8391749edj.373.1594805573934; Wed, 15 Jul 2020 02:32:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594805573; cv=none; d=google.com; s=arc-20160816; b=qIl+Y9kr3F9qPffSjiGWup3NkVbZy6fOIVuEVAEXXcqCBYEK192VDbLxSZBSXg7VEQ 4jpDuz2KXl3ztLXAybqAfDs2d4FA/hc7RGq5fXPvX9emCEYZDvz0Gk8i/TiBpT86Va9w DIIAd/MgHbeXRLqSUqer6C3RUX2b/+Nxy855V4uqBD5en+m9nU5i+YbgaU4rpV7uTeE7 6dlgR8mDgzkMgkfk9Kpm0xEHWFGzuQVLwx3dcN9nh+7yv6oql0yVo2Ha5sGQxXsxAkMY dUbRnXdYNQhYVCwa3g32LBBOGRVFjV5xDOwRIvP5Vhr+cHiHP2D9HPeFydLOrGiWda+7 PCXw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=aGkX+E1EBfqRr0rfaGdLhwyAcBiQ16E9WQER7VbVHB0=; b=USLJa8FSlzCBBbQYOtGxu5wkPpoMyNBE3qdOOmuqnkOEJW9WemHtqKd7K9ExnWts6/ MQWoOTvGGdxYyhJkfyVk1AfglpKdhu3sFwhXd0MGYm1bkY1uVVs3232PWw2QJtlbQgSz Y1x3tyV20rbP2/weW2HNlHy67TjSzPZqmPYoTHVU/4+/rVHq0/BZxxeuMG++icgVwD+/ Q/tQcfKjih0B0LxsJ/0VzlgrnG0IA5/hywFIjhjiWHrgj1Wo+pIU88ehei2NkAtK62Cp vfJ4jOKNLaRWSlLB+U0LO8sezYyObLwEiGruC8EJEMNzrHtVNCk9g5Q4yXTbCdiOwtfi LTxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B9eGyNDC; spf=pass (google.com: domain of linux-usb-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dt8si1321742ejc.466.2020.07.15.02.32.53; Wed, 15 Jul 2020 02:32:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-usb-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B9eGyNDC; spf=pass (google.com: domain of linux-usb-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730863AbgGOJct (ORCPT + 5 others); Wed, 15 Jul 2020 05:32:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730768AbgGOJcQ (ORCPT ); Wed, 15 Jul 2020 05:32:16 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96691C061755 for ; Wed, 15 Jul 2020 02:32:16 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id f18so4873130wml.3 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=eWNlw6MTF6LicYONm/viihE8tcmL16oigE8yErMMH1G+pmpF/UJQridSUak6n/L5dn gahJdZVBRaWk58kQFl/xfsKiKowff2RMcJc9KIIVPPYTuJnvuvTVizFM5m1YLcvVMMyu auPm5ZgiR7sSLAacb+xmQiPlScFLedAjRfiqXcCNcFImjKMJ2y6aUwCIxAaTE8W8HRGo /OqNImMh2x/3+Wq4ZBP2zFqxifc8Rbncn5ODQaWcjDiok95qbDSfkdVS2KnvbV3U0DUQ EfEtHOj2SkdDAd9SrbjchnvReb0jJM+S48MMZzOujzYxsFQq9L7iE05lQMomyoXYFSIm 1dQg== X-Gm-Message-State: AOAM533r/xGc/h73Z+OvebH+NBlxK/3DFwzHE/D83mr0qn10NUjhrxK7 bDNlgGKjpUy9LGdK6Sg8QHsrnw== 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Lee Jones , Ben Dooks , Minas Harutyunyan 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 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.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(-) -- 2.25.1 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);