Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/isapnp Incremental malloc(9) -> kmem(9)



details:   https://anonhg.NetBSD.org/src/rev/3d51764cbde6
branches:  trunk
changeset: 370726:3d51764cbde6
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Sep 25 17:20:03 2022 +0000

description:
Incremental malloc(9) -> kmem(9)

diffstat:

 sys/dev/isapnp/isapnp.c    |  8 ++++----
 sys/dev/isapnp/isapnpvar.h |  4 +++-
 2 files changed, 7 insertions(+), 5 deletions(-)

diffs (53 lines):

diff -r 7ea3adbd59d0 -r 3d51764cbde6 sys/dev/isapnp/isapnp.c
--- a/sys/dev/isapnp/isapnp.c   Sun Sep 25 17:19:05 2022 +0000
+++ b/sys/dev/isapnp/isapnp.c   Sun Sep 25 17:20:03 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: isapnp.c,v 1.62 2021/08/07 16:19:12 thorpej Exp $      */
+/*     $NetBSD: isapnp.c,v 1.63 2022/09/25 17:20:03 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1996, 2008 The NetBSD Foundation, Inc.
@@ -34,14 +34,14 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isapnp.c,v 1.62 2021/08/07 16:19:12 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isapnp.c,v 1.63 2022/09/25 17:20:03 thorpej Exp $");
 
 #include "isadma.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/device.h>
-#include <sys/malloc.h>
+#include <sys/kmem.h>
 
 #include <sys/bus.h>
 
@@ -862,7 +862,7 @@
                if (ipc->ipc_parent == parent)
                        return (0);
 
-       ipc = malloc(sizeof(*ipc), M_DEVBUF, M_WAITOK);
+       ipc = kmem_alloc(sizeof(*ipc), KM_SLEEP);
        ipc->ipc_parent = parent;
        LIST_INSERT_HEAD(&isapnp_probes, ipc, ipc_link);
 
diff -r 7ea3adbd59d0 -r 3d51764cbde6 sys/dev/isapnp/isapnpvar.h
--- a/sys/dev/isapnp/isapnpvar.h        Sun Sep 25 17:19:05 2022 +0000
+++ b/sys/dev/isapnp/isapnpvar.h        Sun Sep 25 17:20:03 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: isapnpvar.h,v 1.28 2009/03/15 15:45:48 cegger Exp $    */
+/*     $NetBSD: isapnpvar.h,v 1.29 2022/09/25 17:20:03 thorpej Exp $   */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -62,6 +62,8 @@
 
 #else
 
+# include <sys/malloc.h>
+
 # define ISAPNP_WRITE_ADDR(sc, v) \
     bus_space_write_1(sc->sc_iot, sc->sc_addr_ioh, 0, v)
 # define ISAPNP_WRITE_DATA(sc, v) \



Home | Main Index | Thread Index | Old Index