Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/atari/vme Misc cleanup.
details: https://anonhg.NetBSD.org/src/rev/66f985c347ab
branches: trunk
changeset: 368150:66f985c347ab
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sun Jun 26 05:16:22 2022 +0000
description:
Misc cleanup.
- use a local variable static
- use aprint_*(9) for attach messages
- KNF
diffstat:
sys/arch/atari/vme/vme_machdep.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diffs (70 lines):
diff -r 848677d3e3bb -r 66f985c347ab sys/arch/atari/vme/vme_machdep.c
--- a/sys/arch/atari/vme/vme_machdep.c Sun Jun 26 05:11:54 2022 +0000
+++ b/sys/arch/atari/vme/vme_machdep.c Sun Jun 26 05:16:22 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vme_machdep.c,v 1.23 2021/08/07 16:18:47 thorpej Exp $ */
+/* $NetBSD: vme_machdep.c,v 1.24 2022/06/26 05:16:22 tsutsui Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vme_machdep.c,v 1.23 2021/08/07 16:18:47 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vme_machdep.c,v 1.24 2022/06/26 05:16:22 tsutsui Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -53,9 +53,9 @@
CFATTACH_DECL_NEW(avmebus, 0,
vmebusmatch, vmebusattach, NULL, NULL);
-int vmebus_attached;
+static int vmebus_attached;
-int
+static int
vmebusmatch(device_t parent, cfdata_t cf, void *aux)
{
@@ -63,13 +63,13 @@
return 0;
if (strcmp((char *)aux, "avmebus") || vmebus_attached)
return 0;
- return (machineid & ATARI_FALCON) ? 0 : 1;
+ return ((machineid & ATARI_FALCON) != 0) ? 0 : 1;
}
-void
+static void
vmebusattach(device_t parent, device_t self, void *aux)
{
- struct vmebus_attach_args vba;
+ struct vmebus_attach_args vba;
vmebus_attached = 1;
@@ -77,7 +77,7 @@
vba.vba_iot = beb_alloc_bus_space_tag(NULL);
vba.vba_memt = beb_alloc_bus_space_tag(NULL);
if ((vba.vba_iot == NULL) || (vba.vba_memt == NULL)) {
- printf("beb_alloc_bus_space_tag failed!\n");
+ aprint_error("beb_alloc_bus_space_tag failed!\n");
return;
}
@@ -87,11 +87,11 @@
vba.vba_iot->base = 0;
vba.vba_memt->base = 0;
- printf("\n");
+ aprint_normal("\n");
config_found(self, &vba, vmebusprint, CFARGS_NONE);
}
-int
+static int
vmebusprint(void *aux, const char *name)
{
Home |
Main Index |
Thread Index |
Old Index