[PATCH] usb: xhci: fix build warning - missing prototype
Fix build warning when building drivers/usb/host/xhci-mem.o due to missing prototype for xhci_free_virt_devices_depth_first. This function is only used in xhci-mem.c so just make it static. Signed-off-by: Jean-Philippe Menil --- drivers/usb/host/xhci-mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index b1f27aa38b10..c5236f5d917a 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -933,7 +933,7 @@ void xhci_free_virt_device(struct xhci_hcd *xhci, int slot_id) * that tt_info, then free the child first. Recursive. * We can't rely on udev at this point to find child-parent relationships. */ -void xhci_free_virt_devices_depth_first(struct xhci_hcd *xhci, int slot_id) +static void xhci_free_virt_devices_depth_first(struct xhci_hcd *xhci, int slot_id) { struct xhci_virt_device *vdev; struct list_head *tt_list_head; -- 2.17.1
[PATCH] usb: xhci: fix build warning - missing prototype
Fix build warning when building drivers/usb/host/xhci-mem.o due to missing prototype for xhci_free_virt_devices_depth_first. This function is only used in xhci-mem.c so just make it static. Signed-off-by: Jean-Philippe Menil --- drivers/usb/host/xhci-mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index b1f27aa38b10..c5236f5d917a 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -933,7 +933,7 @@ void xhci_free_virt_device(struct xhci_hcd *xhci, int slot_id) * that tt_info, then free the child first. Recursive. * We can't rely on udev at this point to find child-parent relationships. */ -void xhci_free_virt_devices_depth_first(struct xhci_hcd *xhci, int slot_id) +static void xhci_free_virt_devices_depth_first(struct xhci_hcd *xhci, int slot_id) { struct xhci_virt_device *vdev; struct list_head *tt_list_head; -- 2.17.1
Re: [PATCH] usb: xhci: fix build warning
On 02.02.2016 08:30, Sudip Mukherjee wrote: We were getting build warning about: drivers/usb/host/xhci.c: In function ‘xhci_add_ep_to_interval_table’: drivers/usb/host/xhci.c:2499:2: warning: enumeration value ‘USB_SPEED_SUPER_PLUS’ not handled in switch Fix it by adding SuperSpeedPlus USB3.1 devices as the behaviour is same as with USB_SPEED_SUPER SuperSpeed devices. Fixes: 8a1b2725a60d ("usb: define USB_SPEED_SUPER_PLUS speed for SuperSpeedPlus USB3.1 devices") Cc: Mathias Nyman Signed-off-by: Sudip Mukherjee The original series that added USB_SPEED_SUPER_PLUS to both core and xhci was only partly accepted. The core part was applied, the rest was asked to be resubmitted. Second part is still waiting to be applied. http://www.spinics.net/lists/linux-usb/msg135493.html -Mathias
Re: [PATCH] usb: xhci: fix build warning
On 02.02.2016 08:30, Sudip Mukherjee wrote: We were getting build warning about: drivers/usb/host/xhci.c: In function ‘xhci_add_ep_to_interval_table’: drivers/usb/host/xhci.c:2499:2: warning: enumeration value ‘USB_SPEED_SUPER_PLUS’ not handled in switch Fix it by adding SuperSpeedPlus USB3.1 devices as the behaviour is same as with USB_SPEED_SUPER SuperSpeed devices. Fixes: 8a1b2725a60d ("usb: define USB_SPEED_SUPER_PLUS speed for SuperSpeedPlus USB3.1 devices") Cc: Mathias NymanSigned-off-by: Sudip Mukherjee The original series that added USB_SPEED_SUPER_PLUS to both core and xhci was only partly accepted. The core part was applied, the rest was asked to be resubmitted. Second part is still waiting to be applied. http://www.spinics.net/lists/linux-usb/msg135493.html -Mathias
[PATCH] usb: xhci: fix build warning
We were getting build warning about: drivers/usb/host/xhci.c: In function ‘xhci_add_ep_to_interval_table’: drivers/usb/host/xhci.c:2499:2: warning: enumeration value ‘USB_SPEED_SUPER_PLUS’ not handled in switch Fix it by adding SuperSpeedPlus USB3.1 devices as the behaviour is same as with USB_SPEED_SUPER SuperSpeed devices. Fixes: 8a1b2725a60d ("usb: define USB_SPEED_SUPER_PLUS speed for SuperSpeedPlus USB3.1 devices") Cc: Mathias Nyman Signed-off-by: Sudip Mukherjee --- drivers/usb/host/xhci.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 26a44c0..5bde15b 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -2410,7 +2410,7 @@ void xhci_drop_ep_from_interval_table(struct xhci_hcd *xhci, if (xhci_is_async_ep(ep_bw->type)) return; - if (udev->speed == USB_SPEED_SUPER) { + if (udev->speed >= USB_SPEED_SUPER) { if (xhci_is_sync_in_ep(ep_bw->type)) xhci->devs[udev->slot_id]->bw_table->ss_bw_in -= xhci_get_ss_bw_consumed(ep_bw); @@ -2448,6 +2448,7 @@ void xhci_drop_ep_from_interval_table(struct xhci_hcd *xhci, interval_bw->overhead[HS_OVERHEAD_TYPE] -= 1; break; case USB_SPEED_SUPER: + case USB_SPEED_SUPER_PLUS: case USB_SPEED_UNKNOWN: case USB_SPEED_WIRELESS: /* Should never happen because only LS/FS/HS endpoints will get @@ -2474,7 +2475,7 @@ static void xhci_add_ep_to_interval_table(struct xhci_hcd *xhci, if (xhci_is_async_ep(ep_bw->type)) return; - if (udev->speed == USB_SPEED_SUPER) { + if (udev->speed >= USB_SPEED_SUPER) { if (xhci_is_sync_in_ep(ep_bw->type)) xhci->devs[udev->slot_id]->bw_table->ss_bw_in += xhci_get_ss_bw_consumed(ep_bw); @@ -2507,6 +2508,7 @@ static void xhci_add_ep_to_interval_table(struct xhci_hcd *xhci, interval_bw->overhead[HS_OVERHEAD_TYPE] += 1; break; case USB_SPEED_SUPER: + case USB_SPEED_SUPER_PLUS: case USB_SPEED_UNKNOWN: case USB_SPEED_WIRELESS: /* Should never happen because only LS/FS/HS endpoints will get -- 1.9.1
[PATCH] usb: xhci: fix build warning
We were getting build warning about: drivers/usb/host/xhci.c: In function ‘xhci_add_ep_to_interval_table’: drivers/usb/host/xhci.c:2499:2: warning: enumeration value ‘USB_SPEED_SUPER_PLUS’ not handled in switch Fix it by adding SuperSpeedPlus USB3.1 devices as the behaviour is same as with USB_SPEED_SUPER SuperSpeed devices. Fixes: 8a1b2725a60d ("usb: define USB_SPEED_SUPER_PLUS speed for SuperSpeedPlus USB3.1 devices") Cc: Mathias NymanSigned-off-by: Sudip Mukherjee --- drivers/usb/host/xhci.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 26a44c0..5bde15b 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -2410,7 +2410,7 @@ void xhci_drop_ep_from_interval_table(struct xhci_hcd *xhci, if (xhci_is_async_ep(ep_bw->type)) return; - if (udev->speed == USB_SPEED_SUPER) { + if (udev->speed >= USB_SPEED_SUPER) { if (xhci_is_sync_in_ep(ep_bw->type)) xhci->devs[udev->slot_id]->bw_table->ss_bw_in -= xhci_get_ss_bw_consumed(ep_bw); @@ -2448,6 +2448,7 @@ void xhci_drop_ep_from_interval_table(struct xhci_hcd *xhci, interval_bw->overhead[HS_OVERHEAD_TYPE] -= 1; break; case USB_SPEED_SUPER: + case USB_SPEED_SUPER_PLUS: case USB_SPEED_UNKNOWN: case USB_SPEED_WIRELESS: /* Should never happen because only LS/FS/HS endpoints will get @@ -2474,7 +2475,7 @@ static void xhci_add_ep_to_interval_table(struct xhci_hcd *xhci, if (xhci_is_async_ep(ep_bw->type)) return; - if (udev->speed == USB_SPEED_SUPER) { + if (udev->speed >= USB_SPEED_SUPER) { if (xhci_is_sync_in_ep(ep_bw->type)) xhci->devs[udev->slot_id]->bw_table->ss_bw_in += xhci_get_ss_bw_consumed(ep_bw); @@ -2507,6 +2508,7 @@ static void xhci_add_ep_to_interval_table(struct xhci_hcd *xhci, interval_bw->overhead[HS_OVERHEAD_TYPE] += 1; break; case USB_SPEED_SUPER: + case USB_SPEED_SUPER_PLUS: case USB_SPEED_UNKNOWN: case USB_SPEED_WIRELESS: /* Should never happen because only LS/FS/HS endpoints will get -- 1.9.1