devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Felipe Balbi <felipe.balbi@linux.intel.com>,
	Matthias Brugger <matthias.bgg@gmail.com>
Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>,
	linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: [PATCH 03/11] usb: mtu3: remove unnecessary local variable @req
Date: Wed, 6 Mar 2019 19:46:15 +0800	[thread overview]
Message-ID: <1551872783-13707-4-git-send-email-chunfeng.yun@mediatek.com> (raw)
In-Reply-To: <1551872783-13707-1-git-send-email-chunfeng.yun@mediatek.com>

The local variable @req is unnecessary in qmu_tx_zlp_error_handler,
so remove it.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/mtu3/mtu3_qmu.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/mtu3/mtu3_qmu.c b/drivers/usb/mtu3/mtu3_qmu.c
index 09f19f70fe8f..f4b5431264c1 100644
--- a/drivers/usb/mtu3/mtu3_qmu.c
+++ b/drivers/usb/mtu3/mtu3_qmu.c
@@ -382,16 +382,13 @@ static void qmu_tx_zlp_error_handler(struct mtu3 *mtu, u8 epnum)
 	struct mtu3_gpd_ring *ring = &mep->gpd_ring;
 	void __iomem *mbase = mtu->mac_base;
 	struct qmu_gpd *gpd_current = NULL;
-	struct usb_request *req = NULL;
 	struct mtu3_request *mreq;
 	dma_addr_t cur_gpd_dma;
 	u32 txcsr = 0;
 	int ret;
 
 	mreq = next_request(mep);
-	if (mreq && mreq->request.length == 0)
-		req = &mreq->request;
-	else
+	if (mreq && mreq->request.length != 0)
 		return;
 
 	cur_gpd_dma = read_txq_cur_addr(mbase, epnum);
@@ -402,7 +399,7 @@ static void qmu_tx_zlp_error_handler(struct mtu3 *mtu, u8 epnum)
 		return;
 	}
 
-	dev_dbg(mtu->dev, "%s send ZLP for req=%p\n", __func__, req);
+	dev_dbg(mtu->dev, "%s send ZLP for req=%p\n", __func__, mreq);
 
 	mtu3_clrbits(mbase, MU3D_EP_TXCR0(mep->epnum), TX_DMAREQEN);
 
-- 
2.20.1

  parent reply	other threads:[~2019-03-06 11:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-06 11:46 [PATCH 00/11] add debugfs consumers, tracepoints and rebuild QMU Chunfeng Yun
2019-03-06 11:46 ` [PATCH 01/11] usb: mtu3: check return value of devm_extcon_register_notifier() Chunfeng Yun
2019-03-06 11:46 ` [PATCH 02/11] usb: mtu3: print useful information also for device and host modes Chunfeng Yun
2019-03-06 11:46 ` Chunfeng Yun [this message]
2019-03-06 11:46 ` [PATCH 04/11] usb: mtu3: rebuild the code of getting vbus regulator Chunfeng Yun
2019-03-06 11:46 ` [PATCH 05/11] usb: mtu3: fix transfer error of USB3 Gen2 isoc Chunfeng Yun
2019-03-06 11:46 ` [PATCH 06/11] usb: mtu3: rebuild qmu_gpd struct to prepare to support new QMU format Chunfeng Yun
2019-03-06 11:46 ` [PATCH 07/11] usb: mtu3: supports " Chunfeng Yun
2019-03-06 11:46 ` [PATCH 08/11] usb: mtu3: add debugfs interface files Chunfeng Yun
2019-03-06 11:46 ` [PATCH 09/11] usb: mtu3: move vbus and mode debugfs interfaces into mtu3_debugfs.c Chunfeng Yun
2019-03-06 11:46 ` [PATCH 10/11] usb: mtu3: add tracepoints to help debug Chunfeng Yun
2019-03-06 11:46 ` [PATCH 11/11] usb: mtu3: add a function to switch mailbox state to string Chunfeng Yun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1551872783-13707-4-git-send-email-chunfeng.yun@mediatek.com \
    --to=chunfeng.yun@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=felipe.balbi@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).