usb: xhci: fix build warnings
Subsystems (2)
v2 cover usb: xhci: fix build warnings
Hello
This patchset fix some build warnings on usb/xhci.
Regards
Changes since v1:
- Changed subject of patch
Corentin Labbe (4):
usb: xhci: remove unused variable last_freed_endpoint
usb: xhci: remove unused variable ep
usb: xhci: remove unused variable urb_priv
usb: xhci: remove unused variable ep_ring
drivers/usb/host/xhci-ring.c | 4 ---- drivers/usb/host/xhci.c | 5 ----- 2 files changed, 9 deletions(-)
Signature · 1 line
2.7.4
PATCH v2 1/4 usb: xhci: remove unused variable last_freed_endpoint
From: Corentin Labbe <[email protected]>
This patch fix the following build warnings:drivers/usb/host/xhci.c:3378:6: warning: variable 'last_freed_endpoint' set but not used [-Wunused-but-set-variable]
--- drivers/usb/host/xhci.c | 3 --- 1 file changed, 3 deletions(-)
drivers/usb/host/xhci.c +0 -3
@@ -3375,7 +3375,6 @@ static int xhci_discover_or_reset_device(struct usb_hcd *hcd,unsigned int slot_id;struct xhci_virt_device *virt_dev;struct xhci_command *reset_device_cmd; -int last_freed_endpoint;struct xhci_slot_ctx *slot_ctx;int old_active_eps =0 ;
@@ -3490,7 +3489,6 @@ static int xhci_discover_or_reset_device(struct usb_hcd *hcd, }/* Everything but endpoint 0 is disabled, so free the rings. */ - last_freed_endpoint =1 ;for (i =1 ; i <31 ; i++) {struct xhci_virt_ep *ep = &virt_dev->eps[i];
@@ -3505,7 +3503,6 @@ static int xhci_discover_or_reset_device(struct usb_hcd *hcd,if (ep->ring) {xhci_debugfs_remove_endpoint (xhci, virt_dev, i);xhci_free_endpoint_ring (xhci, virt_dev, i); - last_freed_endpoint = i; }if (!list_empty (&virt_dev->eps[i].bw_endpoint_list)) xhci_drop_ep_from_interval_table(xhci,
Signature · 1 line
2.7.4
PATCH v2 2/4 usb: xhci: remove unused variable ep
In reply to Corentin LabbeFrom: Corentin Labbe <[email protected]>
This patch fix the following build warning:drivers/usb/host/xhci.c:2853:23: warning: variable 'ep' set but not used [-Wunused-but-set-variable]
--- drivers/usb/host/xhci.c | 2 -- 1 file changed, 2 deletions(-)
drivers/usb/host/xhci.c +0 -2
@@ -2850,12 +2850,10 @@ void xhci_cleanup_stalled_ring(struct xhci_hcd *xhci, unsigned int ep_index, unsigned int stream_id, struct xhci_td *td) { struct xhci_dequeue_state deq_state; -struct xhci_virt_ep *ep;struct usb_device *udev = td->urb->dev;xhci_dbg_trace (xhci, trace_xhci_dbg_reset_ep,"Cleaning up stalled endpoint ring" ); - ep = &xhci->devs[udev->slot_id]->eps[ep_index];/* We need to move the HW's dequeue pointer past this TD, * or it will attempt to resend it on the next doorbell ring. */
Signature · 1 line
2.7.4
PATCH v2 3/4 usb: xhci: remove unused variable urb_priv
In reply to Corentin LabbeFrom: Corentin Labbe <[email protected]>
This patch fix the following build warning:drivers/usb/host/xhci-ring.c:1895:19: warning: variable 'urb_priv' set but not used [-Wunused-but-set-variable]
--- drivers/usb/host/xhci-ring.c | 2 -- 1 file changed, 2 deletions(-)
drivers/usb/host/xhci-ring.c +0 -2
@@ -1890,12 +1890,10 @@ int xhci_is_vendor_info_code(struct xhci_hcd *xhci, unsigned int trb_comp_code)static int xhci_td_cleanup (struct xhci_hcd *xhci,struct xhci_td *td,struct xhci_ring *ep_ring,int *status) { -struct urb_priv *urb_priv;struct urb *urb =NULL ;/* Clean up the endpoint's TD list */ urb = td->urb; - urb_priv = urb->hcpriv;/* if a bounce buffer was used to align this td then unmap it */ xhci_unmap_td_bounce_buffer (xhci, ep_ring, td);
Signature · 1 line
2.7.4
PATCH v2 4/4 usb: xhci: remove unused variable ep_ring
In reply to Corentin LabbeFrom: Corentin Labbe <[email protected]>
This patch fix the following build warnings:drivers/usb/host/xhci-ring.c:2011:20: warning: variable 'ep_ring' set but not used [-Wunused-but-set-variable]
--- drivers/usb/host/xhci-ring.c | 2 -- 1 file changed, 2 deletions(-)
drivers/usb/host/xhci-ring.c +0 -2
@@ -2004,7 +2004,6 @@ static int process_ctrl_td(struct xhci_hcd *xhci, struct xhci_td *td, struct xhci_virt_ep *ep, int *status) { struct xhci_virt_device *xdev; -struct xhci_ring *ep_ring;unsigned int slot_id;int ep_index;struct xhci_ep_ctx *ep_ctx;
@@ -2016,7 +2015,6 @@ static int process_ctrl_td(struct xhci_hcd *xhci, struct xhci_td *td, slot_id =TRB_TO_SLOT_ID (le32_to_cpu (event->flags)); xdev = xhci->devs[slot_id]; ep_index =TRB_TO_EP_ID (le32_to_cpu (event->flags)) -1 ; - ep_ring =xhci_dma_to_transfer_ring (ep,le64_to_cpu (event->buffer)); ep_ctx =xhci_get_ep_ctx (xhci, xdev->out_ctx, ep_index); trb_comp_code =GET_COMP_CODE (le32_to_cpu (event->transfer_len)); requested = td->urb->transfer_buffer_length;
Signature · 1 line
2.7.4
Quoted 15 lines · Corentin Labbe
Hello
This patchset fix some build warnings on usb/xhci.
Regards
Changes since v1:
- Changed subject of patchCorentin Labbe (4):
usb: xhci: remove unused variablelast_freed_endpoint
usb: xhci: remove unused variable ep
usb: xhci: remove unused variableurb_priv
usb: xhci: remove unused variableep_ring
Quoted 4 lines
drivers/usb/host/xhci-ring.c | 4 ---- drivers/usb/host/xhci.c | 5 ----- 2 files changed, 9 deletions(-)
Thanks, adding to queue.
Did some minor modification to commit messages to avoid long lines
-Mathias