Module Name:    src
Committed By:   thorpej
Date:           Sat Nov 21 17:25:52 UTC 2020

Modified Files:
        src/sys/arch/sh3/dev: sci.c scif.c

Log Message:
malloc(9) -> kmem(9)


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/sh3/dev/sci.c
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/sh3/dev/scif.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sh3/dev/sci.c
diff -u src/sys/arch/sh3/dev/sci.c:1.62 src/sys/arch/sh3/dev/sci.c:1.63
--- src/sys/arch/sh3/dev/sci.c:1.62	Sun Nov 10 21:16:32 2019
+++ src/sys/arch/sh3/dev/sci.c	Sat Nov 21 17:25:52 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: sci.c,v 1.62 2019/11/10 21:16:32 chs Exp $ */
+/* $NetBSD: sci.c,v 1.63 2020/11/21 17:25:52 thorpej Exp $ */
 
 /*-
  * Copyright (C) 1999 T.Horiuchi and SAITOH Masanobu.  All rights reserved.
@@ -93,7 +93,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sci.c,v 1.62 2019/11/10 21:16:32 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sci.c,v 1.63 2020/11/21 17:25:52 thorpej Exp $");
 
 #include "opt_kgdb.h"
 #include "opt_sci.h"
@@ -107,7 +107,7 @@ __KERNEL_RCSID(0, "$NetBSD: sci.c,v 1.62
 #include <sys/syslog.h>
 #include <sys/kernel.h>
 #include <sys/device.h>
-#include <sys/malloc.h>
+#include <sys/kmem.h>
 #include <sys/kauth.h>
 #include <sys/intr.h>
 
@@ -416,7 +416,7 @@ sci_attach(device_t parent, device_t sel
 	tp->t_hwiflow = NULL;
 
 	sc->sc_tty = tp;
-	sc->sc_rbuf = malloc(sci_rbuf_size << 1, M_DEVBUF, M_WAITOK);
+	sc->sc_rbuf = kmem_alloc(sci_rbuf_size << 1, KM_SLEEP);
 	sc->sc_ebuf = sc->sc_rbuf + (sci_rbuf_size << 1);
 
 	tty_attach(tp);

Index: src/sys/arch/sh3/dev/scif.c
diff -u src/sys/arch/sh3/dev/scif.c:1.67 src/sys/arch/sh3/dev/scif.c:1.68
--- src/sys/arch/sh3/dev/scif.c:1.67	Sun Nov 10 21:16:32 2019
+++ src/sys/arch/sh3/dev/scif.c	Sat Nov 21 17:25:52 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: scif.c,v 1.67 2019/11/10 21:16:32 chs Exp $ */
+/*	$NetBSD: scif.c,v 1.68 2020/11/21 17:25:52 thorpej Exp $ */
 
 /*-
  * Copyright (C) 1999 T.Horiuchi and SAITOH Masanobu.  All rights reserved.
@@ -93,7 +93,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scif.c,v 1.67 2019/11/10 21:16:32 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scif.c,v 1.68 2020/11/21 17:25:52 thorpej Exp $");
 
 #include "opt_kgdb.h"
 #include "opt_scif.h"
@@ -107,7 +107,7 @@ __KERNEL_RCSID(0, "$NetBSD: scif.c,v 1.6
 #include <sys/syslog.h>
 #include <sys/kernel.h>
 #include <sys/device.h>
-#include <sys/malloc.h>
+#include <sys/kmem.h>
 #include <sys/kgdb.h>
 #include <sys/kauth.h>
 #include <sys/intr.h>
@@ -497,7 +497,7 @@ scif_attach(device_t parent, device_t se
 	tp->t_hwiflow = NULL;
 
 	sc->sc_tty = tp;
-	sc->sc_rbuf = malloc(scif_rbuf_size << 1, M_DEVBUF, M_WAITOK);
+	sc->sc_rbuf = kmem_alloc(scif_rbuf_size << 1, KM_SLEEP);
 	sc->sc_ebuf = sc->sc_rbuf + (scif_rbuf_size << 1);
 
 	tty_attach(tp);

Reply via email to