Module Name:    src
Committed By:   thorpej
Date:           Sat Sep 17 16:42:38 UTC 2022

Modified Files:
        src/sys/dev/isa: if_eg.c

Log Message:
malloc() -> kmem_alloc()


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/dev/isa/if_eg.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/dev/isa/if_eg.c
diff -u src/sys/dev/isa/if_eg.c:1.97 src/sys/dev/isa/if_eg.c:1.98
--- src/sys/dev/isa/if_eg.c:1.97	Wed Jan 29 06:21:40 2020
+++ src/sys/dev/isa/if_eg.c	Sat Sep 17 16:42:38 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_eg.c,v 1.97 2020/01/29 06:21:40 thorpej Exp $	*/
+/*	$NetBSD: if_eg.c,v 1.98 2022/09/17 16:42:38 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1993 Dean Huxley <d...@fsa.ca>
@@ -40,12 +40,13 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_eg.c,v 1.97 2020/01/29 06:21:40 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_eg.c,v 1.98 2022/09/17 16:42:38 thorpej Exp $");
 
 #include "opt_inet.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>
+#include <sys/kmem.h>
 #include <sys/mbuf.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
@@ -496,7 +497,7 @@ eginit(struct eg_softc *sc)
 		aprint_error_dev(sc->sc_dev,"configure card command failed\n");
 
 	if (sc->eg_inbuf == NULL) {
-		sc->eg_inbuf = malloc(EG_BUFLEN, M_TEMP, M_NOWAIT);
+		sc->eg_inbuf = kmem_alloc(EG_BUFLEN, KM_NOSLEEP);
 		if (sc->eg_inbuf == NULL) {
 			aprint_error_dev(sc->sc_dev, "can't allocate inbuf\n");
 			panic("eginit");
@@ -505,7 +506,7 @@ eginit(struct eg_softc *sc)
 	sc->eg_incount = 0;
 
 	if (sc->eg_outbuf == NULL) {
-		sc->eg_outbuf = malloc(EG_BUFLEN, M_TEMP, M_NOWAIT);
+		sc->eg_outbuf = kmem_alloc(EG_BUFLEN, KM_NOSLEEP);
 		if (sc->eg_outbuf == NULL) {
 			aprint_error_dev(sc->sc_dev,"can't allocate outbuf\n");
 			panic("eginit");

Reply via email to