From fd2521f18de773ea9fa31ab490cdc484519dbf4c Mon Sep 17 00:00:00 2001 From: krw Date: Fri, 6 Oct 2023 16:06:11 +0000 Subject: [PATCH] Rename 'ifaceidx' variables and parameters to 'ifaceno'. More consistent with existing code and thus less cnance for confusion. requested by kettenis@ --- sys/dev/usb/ucom.c | 8 ++++---- sys/dev/usb/usb_subr.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index 7b1fcf43bcc..336d3a3a46d 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ucom.c,v 1.77 2023/10/02 23:38:11 krw Exp $ */ +/* $OpenBSD: ucom.c,v 1.78 2023/10/06 16:06:11 krw Exp $ */ /* $NetBSD: ucom.c,v 1.49 2003/01/01 00:10:25 thorpej Exp $ */ /* @@ -1256,7 +1256,7 @@ sysctl_ucominit(void) int rslt; unsigned int unit; uint32_t route; - uint8_t bus, ifaceidx; + uint8_t bus, ifaceno; KERNEL_ASSERT_LOCKED(); @@ -1272,11 +1272,11 @@ sysctl_ucominit(void) if (sc == NULL || sc->sc_iface == NULL) continue; if (usbd_get_location(sc->sc_uparent, sc->sc_iface, - &bus, &route, &ifaceidx) == -1) + &bus, &route, &ifaceno) == -1) continue; rslt = snprintf(name, sizeof(name), "%s:usb%u.%u.%05x.%u,", sc->sc_dev.dv_xname, bus, - ROUTEROOTPORT(route), ROUTESTRING(route), ifaceidx); + ROUTEROOTPORT(route), ROUTESTRING(route), ifaceno); if (rslt < sizeof(name) && (strlen(ucoms) + rslt) < ucomslen) strlcat(ucoms, name, ucomslen); diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index ca8d79cf517..60997d7ffec 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usb_subr.c,v 1.161 2023/10/02 23:38:11 krw Exp $ */ +/* $OpenBSD: usb_subr.c,v 1.162 2023/10/06 16:06:11 krw Exp $ */ /* $NetBSD: usb_subr.c,v 1.103 2003/01/10 11:19:13 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ @@ -1362,7 +1362,7 @@ usbd_get_routestring(struct usbd_device *dev, uint32_t *route) int usbd_get_location(struct usbd_device *dev, struct usbd_interface *iface, - uint8_t *bus, uint32_t *route, uint8_t *ifaceidx) + uint8_t *bus, uint32_t *route, uint8_t *ifaceno) { int i; uint32_t r; @@ -1380,7 +1380,7 @@ usbd_get_location(struct usbd_device *dev, struct usbd_interface *iface, if (iface == &dev->ifaces[i]) { *bus = dev->bus->usbctl->dv_unit; *route = (usbd_get_routestring(dev, &r)) ? 0 : r; - *ifaceidx = i; + *ifaceno = i; return 0; } } -- 2.20.1