[SeaBIOS] hw/usb-xhci: Remove unused const variables

Paul Menzel paulepanter at users.sourceforge.net
Fri May 13 07:28:40 CEST 2016


Date: Fri, 13 May 2016 07:03:36 +0200
Subject: [PATCH 1/2] hw/usb-xhci: Remove unused const variables

Remove the unused arrays `eptype_to_xhci_in` and `eptype_to_xhci_out` to
fix the GCC 6 warnings below.

```
$ gcc-6 --version
gcc-6 (Debian 6.1.1-3) 6.1.1 20160511
[…]
$ make CC=gcc-6
[…]
Compile checking out/src/hw/usb-xhci.o
[…]
src/hw/usb-xhci.c:296:18: warning: 'eptype_to_xhci_out' defined but not used [-Wunused-const-variable=]
 static const int eptype_to_xhci_out[] = {
                  ^~~~~~~~~~~~~~~~~~
src/hw/usb-xhci.c:289:18: warning: 'eptype_to_xhci_in' defined but not used [-Wunused-const-variable=]
 static const int eptype_to_xhci_in[] = {
```

Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
---
 src/hw/usb-xhci.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/src/hw/usb-xhci.c b/src/hw/usb-xhci.c
index 5e2f071..69954b9 100644
--- a/src/hw/usb-xhci.c
+++ b/src/hw/usb-xhci.c
@@ -286,20 +286,6 @@ static const int speed_to_xhci[] = {
     [ USB_SUPERSPEED ] = 4,
 };
 
-static const int eptype_to_xhci_in[] = {
-    [ USB_ENDPOINT_XFER_CONTROL] = 4,
-    [ USB_ENDPOINT_XFER_ISOC   ] = 5,
-    [ USB_ENDPOINT_XFER_BULK   ] = 6,
-    [ USB_ENDPOINT_XFER_INT    ] = 7,
-};
-
-static const int eptype_to_xhci_out[] = {
-    [ USB_ENDPOINT_XFER_CONTROL] = 4,
-    [ USB_ENDPOINT_XFER_ISOC   ] = 1,
-    [ USB_ENDPOINT_XFER_BULK   ] = 2,
-    [ USB_ENDPOINT_XFER_INT    ] = 3,
-};
-
 static int wait_bit(u32 *reg, u32 mask, int value, u32 timeout)
 {
     u32 end = timer_calc(timeout);
-- 
2.8.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://www.coreboot.org/pipermail/seabios/attachments/20160513/176cc2a5/attachment.asc>


More information about the SeaBIOS mailing list