Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/dwc2 More converstion from usbd_status to i...
details: https://anonhg.NetBSD.org/src/rev/6377f965c850
branches: trunk
changeset: 1017741:6377f965c850
user: skrll <skrll%NetBSD.org@localhost>
date: Thu Jan 07 13:25:51 2021 +0000
description:
More converstion from usbd_status to int for function error reporting.
This time it's the turn of usb_allocmem.
(missed in previous commit)
diffstat:
sys/external/bsd/dwc2/dwc2.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (39 lines):
diff -r 53635b3e9b17 -r 6377f965c850 sys/external/bsd/dwc2/dwc2.c
--- a/sys/external/bsd/dwc2/dwc2.c Thu Jan 07 12:02:52 2021 +0000
+++ b/sys/external/bsd/dwc2/dwc2.c Thu Jan 07 13:25:51 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc2.c,v 1.75 2020/12/22 01:07:23 riastradh Exp $ */
+/* $NetBSD: dwc2.c,v 1.76 2021/01/07 13:25:51 skrll Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.75 2020/12/22 01:07:23 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.76 2021/01/07 13:25:51 skrll Exp $");
#include "opt_usb.h"
@@ -375,7 +375,6 @@
usb_endpoint_descriptor_t *ed = pipe->up_endpoint->ue_edesc;
uint8_t addr = dev->ud_addr;
uint8_t xfertype = UE_GET_XFERTYPE(ed->bmAttributes);
- usbd_status err;
DPRINTF("pipe %p addr %d xfertype %d dir %s\n", pipe, addr, xfertype,
UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN ? "in" : "out");
@@ -404,10 +403,10 @@
switch (xfertype) {
case UE_CONTROL:
pipe->up_methods = &dwc2_device_ctrl_methods;
- err = usb_allocmem(&sc->sc_bus, sizeof(usb_device_request_t),
+ int err = usb_allocmem(&sc->sc_bus, sizeof(usb_device_request_t),
0, USBMALLOC_COHERENT, &dpipe->req_dma);
if (err)
- return err;
+ return USBD_NOMEM;
break;
case UE_INTERRUPT:
pipe->up_methods = &dwc2_device_intr_methods;
Home |
Main Index |
Thread Index |
Old Index