This one is similar to the athn(4) fix I committed a couple of days
ago. The compiler complains, because the argument to the macro might
be signed. An explicit cast does the trick here as well.
ok?
Index: dev/usb/uhcireg.h
===================================================================
RCS file: /cvs/src/sys/dev/usb/uhcireg.h,v
retrieving revision 1.15
diff -u -p -r1.15 uhcireg.h
--- dev/usb/uhcireg.h 15 Apr 2013 09:23:02 -0000 1.15
+++ dev/usb/uhcireg.h 23 Dec 2016 18:46:31 -0000
@@ -163,7 +163,7 @@ struct uhci_td {
#define UHCI_TD_GET_ENDPT(s) (((s) >> 15) & 0xf)
#define UHCI_TD_SET_DT(t) ((t) << 19)
#define UHCI_TD_GET_DT(s) (((s) >> 19) & 1)
-#define UHCI_TD_SET_MAXLEN(l) (((l)-1) << 21)
+#define UHCI_TD_SET_MAXLEN(l) (((uint32_t)(l)-1) << 21)
#define UHCI_TD_GET_MAXLEN(s) ((((s) >> 21) + 1) & 0x7ff)
#define UHCI_TD_MAXLEN_MASK 0xffe00000
u_int32_t td_buffer;