linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] usb: xhci: fix build warnings
@ 2017-10-26 10:46 Corentin Labbe
  2017-10-26 10:46 ` [PATCH v2 1/4] usb: xhci: remove unused variable last_freed_endpoint Corentin Labbe
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Corentin Labbe @ 2017-10-26 10:46 UTC (permalink / raw)
  To: mathias.nyman, gregkh; +Cc: linux-usb, linux-kernel, Corentin Labbe

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(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/4] usb: xhci: remove unused variable last_freed_endpoint
  2017-10-26 10:46 [PATCH v2 0/4] usb: xhci: fix build warnings Corentin Labbe
@ 2017-10-26 10:46 ` Corentin Labbe
  2017-10-26 10:46 ` [PATCH v2 2/4] usb: xhci: remove unused variable ep Corentin Labbe
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Corentin Labbe @ 2017-10-26 10:46 UTC (permalink / raw)
  To: mathias.nyman, gregkh; +Cc: linux-usb, linux-kernel, Corentin Labbe

From: Corentin Labbe <clabbe.montjoie@gmail.com>

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]

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 drivers/usb/host/xhci.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index ee077a2..b12b2bd 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -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,
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 2/4] usb: xhci: remove unused variable ep
  2017-10-26 10:46 [PATCH v2 0/4] usb: xhci: fix build warnings Corentin Labbe
  2017-10-26 10:46 ` [PATCH v2 1/4] usb: xhci: remove unused variable last_freed_endpoint Corentin Labbe
@ 2017-10-26 10:46 ` Corentin Labbe
  2017-10-26 10:46 ` [PATCH v2 3/4] usb: xhci: remove unused variable urb_priv Corentin Labbe
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Corentin Labbe @ 2017-10-26 10:46 UTC (permalink / raw)
  To: mathias.nyman, gregkh; +Cc: linux-usb, linux-kernel, Corentin Labbe

From: Corentin Labbe <clabbe.montjoie@gmail.com>

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]

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 drivers/usb/host/xhci.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index b12b2bd..eae86bd 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -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.
 	 */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 3/4] usb: xhci: remove unused variable urb_priv
  2017-10-26 10:46 [PATCH v2 0/4] usb: xhci: fix build warnings Corentin Labbe
  2017-10-26 10:46 ` [PATCH v2 1/4] usb: xhci: remove unused variable last_freed_endpoint Corentin Labbe
  2017-10-26 10:46 ` [PATCH v2 2/4] usb: xhci: remove unused variable ep Corentin Labbe
@ 2017-10-26 10:46 ` Corentin Labbe
  2017-10-26 10:46 ` [PATCH v2 4/4] usb: xhci: remove unused variable ep_ring Corentin Labbe
  2017-10-31 13:03 ` [PATCH v2 0/4] usb: xhci: fix build warnings Mathias Nyman
  4 siblings, 0 replies; 6+ messages in thread
From: Corentin Labbe @ 2017-10-26 10:46 UTC (permalink / raw)
  To: mathias.nyman, gregkh; +Cc: linux-usb, linux-kernel, Corentin Labbe

From: Corentin Labbe <clabbe.montjoie@gmail.com>

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]

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 drivers/usb/host/xhci-ring.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 521d19e..942eeb3 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -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);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 4/4] usb: xhci: remove unused variable ep_ring
  2017-10-26 10:46 [PATCH v2 0/4] usb: xhci: fix build warnings Corentin Labbe
                   ` (2 preceding siblings ...)
  2017-10-26 10:46 ` [PATCH v2 3/4] usb: xhci: remove unused variable urb_priv Corentin Labbe
@ 2017-10-26 10:46 ` Corentin Labbe
  2017-10-31 13:03 ` [PATCH v2 0/4] usb: xhci: fix build warnings Mathias Nyman
  4 siblings, 0 replies; 6+ messages in thread
From: Corentin Labbe @ 2017-10-26 10:46 UTC (permalink / raw)
  To: mathias.nyman, gregkh; +Cc: linux-usb, linux-kernel, Corentin Labbe

From: Corentin Labbe <clabbe.montjoie@gmail.com>

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]

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 drivers/usb/host/xhci-ring.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 942eeb3..27d657e 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -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;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 0/4] usb: xhci: fix build warnings
  2017-10-26 10:46 [PATCH v2 0/4] usb: xhci: fix build warnings Corentin Labbe
                   ` (3 preceding siblings ...)
  2017-10-26 10:46 ` [PATCH v2 4/4] usb: xhci: remove unused variable ep_ring Corentin Labbe
@ 2017-10-31 13:03 ` Mathias Nyman
  4 siblings, 0 replies; 6+ messages in thread
From: Mathias Nyman @ 2017-10-31 13:03 UTC (permalink / raw)
  To: Corentin Labbe, mathias.nyman, gregkh; +Cc: linux-usb, linux-kernel

On 26.10.2017 13:46, Corentin Labbe wrote:
> 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(-)
>

Thanks, adding to queue.

Did some minor modification to commit messages to avoid long lines

-Mathias  

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-10-31 12:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-26 10:46 [PATCH v2 0/4] usb: xhci: fix build warnings Corentin Labbe
2017-10-26 10:46 ` [PATCH v2 1/4] usb: xhci: remove unused variable last_freed_endpoint Corentin Labbe
2017-10-26 10:46 ` [PATCH v2 2/4] usb: xhci: remove unused variable ep Corentin Labbe
2017-10-26 10:46 ` [PATCH v2 3/4] usb: xhci: remove unused variable urb_priv Corentin Labbe
2017-10-26 10:46 ` [PATCH v2 4/4] usb: xhci: remove unused variable ep_ring Corentin Labbe
2017-10-31 13:03 ` [PATCH v2 0/4] usb: xhci: fix build warnings Mathias Nyman

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).