Skip to contentSkip to conversation

usb: dwc2: remove set but unused variable

PATCH In review Josh Abraham 2 participants 2 messages Sep 12, 2018 – Sep 13, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: dwc2: remove set but unused variable

This patch removes a set but unused variable in hcd.c.

Fixes warning:
variable ‘data_fifo’ set but not used [-Wunused-but-set-variable]

---
 drivers/usb/dwc2/hcd.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/usb/dwc2/hcd.c +0 -3
index 2bd6e6bfc241..5f23b933cafc 100644
@@ -1328,14 +1328,11 @@ static void dwc2_hc_write_packet(struct dwc2_hsotg *hsotg,
 	u32 remaining_count;
 	u32 byte_count;
 	u32 dword_count;
-	u32 __iomem *data_fifo;
 	u32 *data_buf = (u32 *)chan->xfer_buf;
 
 	if (dbg_hc(chan))
 		dev_vdbg(hsotg->dev, "%s()\n", __func__);
 
-	data_fifo = (u32 __iomem *)(hsotg->regs + HCFIFO(chan->hc_num));
-
 	remaining_count = chan->xfer_len - chan->xfer_count;
 	if (remaining_count > chan->max_packet)
 		byte_count = chan->max_packet;
Signature · 1 line
2.17.1
Acked-by on v1 1/1
#1 lore raw
Quoted 20 lines · Josh Abraham

This patch removes a set but unused variable in hcd.c.

Fixes warning:
variable ‘data_fifo’ set but not used [-Wunused-but-set-variable]

---
  drivers/usb/dwc2/hcd.c | 3 ---
  1 file changed, 3 deletions(-)
drivers/usb/dwc2/hcd.c +0 -1
index 2bd6e6bfc241..5f23b933cafc 100644
@@ -1328,14 +1328,11 @@ static void dwc2_hc_write_packet(struct dwc2_hsotg *hsotg,
  	u32 remaining_count;
  	u32 byte_count;
  	u32 dword_count;
-	u32 __iomem *data_fifo;

drivers/usb/dwc2/hcd.c static void dwc2_hc_write_packet(struct dwc2_hsotg *hsotg, · line 1338

Quoted 10 lines
drivers/usb/dwc2/hcd.c +0 -2
  	u32 *data_buf = (u32 *)chan->xfer_buf;
 
  	if (dbg_hc(chan))
  		dev_vdbg(hsotg->dev, "%s()\n", __func__);
 
-	data_fifo = (u32 __iomem *)(hsotg->regs + HCFIFO(chan->hc_num));
-
  	remaining_count = chan->xfer_len - chan->xfer_count;
  	if (remaining_count > chan->max_packet)
  		byte_count = chan->max_packet;