Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb sc_statuspend is allocated with kmem_zalloc, so ...



details:   https://anonhg.NetBSD.org/src/rev/c1315236d82b
branches:  trunk
changeset: 933899:c1315236d82b
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun May 31 08:05:30 2020 +0000

description:
sc_statuspend is allocated with kmem_zalloc, so no need to memset it.

diffstat:

 sys/dev/usb/uhub.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r 83272faf13a6 -r c1315236d82b sys/dev/usb/uhub.c
--- a/sys/dev/usb/uhub.c        Sun May 31 07:53:38 2020 +0000
+++ b/sys/dev/usb/uhub.c        Sun May 31 08:05:30 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uhub.c,v 1.145 2020/05/15 12:34:52 maxv Exp $  */
+/*     $NetBSD: uhub.c,v 1.146 2020/05/31 08:05:30 maxv Exp $  */
 /*     $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $       */
 /*     $OpenBSD: uhub.c,v 1.86 2015/06/29 18:27:40 mpi Exp $ */
 
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.145 2020/05/15 12:34:52 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.146 2020/05/31 08:05:30 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -365,7 +365,6 @@
        sc->sc_statuspend = kmem_zalloc(sc->sc_statuslen, KM_SLEEP);
        sc->sc_status = kmem_alloc(sc->sc_statuslen, KM_SLEEP);
        mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_SOFTUSB);
-       memset(sc->sc_statuspend, 0, sc->sc_statuslen);
 
        /* force initial scan */
        memset(sc->sc_status, 0xff, sc->sc_statuslen);



Home | Main Index | Thread Index | Old Index