Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/eisa - Remove unused <sys/malloc.h> include.
details: https://anonhg.NetBSD.org/src/rev/dd5f798fd3bf
branches: trunk
changeset: 984873:dd5f798fd3bf
user: thorpej <thorpej%NetBSD.org@localhost>
date: Tue Jul 27 01:18:04 2021 +0000
description:
- Remove unused <sys/malloc.h> include.
- Rename ahb_ecb_phys_kv() to ahb_ecb_lookup().
- Remove a bogus comment.
diffstat:
sys/dev/eisa/ahb.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diffs (66 lines):
diff -r 3452783daa91 -r dd5f798fd3bf sys/dev/eisa/ahb.c
--- a/sys/dev/eisa/ahb.c Mon Jul 26 22:50:36 2021 +0000
+++ b/sys/dev/eisa/ahb.c Tue Jul 27 01:18:04 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ahb.c,v 1.68 2021/07/26 16:45:56 thorpej Exp $ */
+/* $NetBSD: ahb.c,v 1.69 2021/07/27 01:18:04 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahb.c,v 1.68 2021/07/26 16:45:56 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahb.c,v 1.69 2021/07/27 01:18:04 thorpej Exp $");
#include "opt_ddb.h"
@@ -58,7 +58,6 @@
#include <sys/errno.h>
#include <sys/ioctl.h>
#include <sys/device.h>
-#include <sys/malloc.h>
#include <sys/buf.h>
#include <sys/proc.h>
@@ -121,7 +120,7 @@
static int ahbintr(void *);
static void ahb_free_ecb(struct ahb_softc *, struct ahb_ecb *);
static struct ahb_ecb *ahb_get_ecb(struct ahb_softc *);
-static struct ahb_ecb *ahb_ecb_phys_kv(struct ahb_softc *, uint32_t);
+static struct ahb_ecb *ahb_ecb_lookup(struct ahb_softc *, uint32_t);
static void ahb_done(struct ahb_softc *, struct ahb_ecb *);
static int ahb_find(bus_space_tag_t, bus_space_handle_t,
struct ahb_probe_data *);
@@ -324,7 +323,7 @@
Debugger();
}
- bus_space_write_4(iot, ioh, MBOXOUT0, cmd); /* don't know this will work */
+ bus_space_write_4(iot, ioh, MBOXOUT0, cmd);
bus_space_write_1(iot, ioh, G2CNTRL, G2CNTRL_SET_HOST_READY);
bus_space_write_1(iot, ioh, ATTN, OP_IMMED |
ecb->xs->xs_periph->periph_target);
@@ -374,7 +373,7 @@
case AHB_ECB_OK:
case AHB_ECB_RECOVERED:
case AHB_ECB_ERR:
- ecb = ahb_ecb_phys_kv(sc, mboxval);
+ ecb = ahb_ecb_lookup(sc, mboxval);
if (!ecb) {
aprint_error_dev(sc->sc_dev,
"BAD ECB RETURNED!\n");
@@ -506,10 +505,10 @@
}
/*
- * given a physical address, find the ecb that it corresponds to.
+ * Lookup and return the ECB that has the specified DMA address.
*/
static struct ahb_ecb *
-ahb_ecb_phys_kv(struct ahb_softc *sc, uint32_t ecb_phys)
+ahb_ecb_lookup(struct ahb_softc *sc, uint32_t ecb_phys)
{
int hashnum = ECB_HASH(ecb_phys);
struct ahb_ecb *ecb = sc->sc_ecbhash[hashnum];
Home |
Main Index |
Thread Index |
Old Index