Module Name: src Committed By: thorpej Date: Fri Jun 18 22:17:53 UTC 2021
Modified Files: src/sys/arch/alpha/pci: apecs.c cia.c irongate.c lca.c mcpcia.c Log Message: Sprinkle some static. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/arch/alpha/pci/apecs.c cvs rdiff -u -r1.75 -r1.76 src/sys/arch/alpha/pci/cia.c cvs rdiff -u -r1.17 -r1.18 src/sys/arch/alpha/pci/irongate.c cvs rdiff -u -r1.52 -r1.53 src/sys/arch/alpha/pci/lca.c cvs rdiff -u -r1.31 -r1.32 src/sys/arch/alpha/pci/mcpcia.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/alpha/pci/apecs.c diff -u src/sys/arch/alpha/pci/apecs.c:1.55 src/sys/arch/alpha/pci/apecs.c:1.56 --- src/sys/arch/alpha/pci/apecs.c:1.55 Sat Apr 24 23:36:23 2021 +++ src/sys/arch/alpha/pci/apecs.c Fri Jun 18 22:17:53 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: apecs.c,v 1.55 2021/04/24 23:36:23 thorpej Exp $ */ +/* $NetBSD: apecs.c,v 1.56 2021/06/18 22:17:53 thorpej Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: apecs.c,v 1.55 2021/04/24 23:36:23 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: apecs.c,v 1.56 2021/06/18 22:17:53 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -106,7 +106,7 @@ static int apecs_bus_get_window(int, int struct alpha_bus_space_translation *); /* There can be only one. */ -int apecsfound; +static int apecsfound; struct apecs_config apecs_configuration; static int @@ -234,7 +234,8 @@ apecsattach(device_t parent, device_t se } static int -apecs_bus_get_window(int type, int window, struct alpha_bus_space_translation *abst) +apecs_bus_get_window(int type, int window, + struct alpha_bus_space_translation *abst) { struct apecs_config *acp = &apecs_configuration; bus_space_tag_t st; Index: src/sys/arch/alpha/pci/cia.c diff -u src/sys/arch/alpha/pci/cia.c:1.75 src/sys/arch/alpha/pci/cia.c:1.76 --- src/sys/arch/alpha/pci/cia.c:1.75 Sat Apr 24 23:36:23 2021 +++ src/sys/arch/alpha/pci/cia.c Fri Jun 18 22:17:53 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: cia.c,v 1.75 2021/04/24 23:36:23 thorpej Exp $ */ +/* $NetBSD: cia.c,v 1.76 2021/06/18 22:17:53 thorpej Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: cia.c,v 1.75 2021/04/24 23:36:23 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cia.c,v 1.76 2021/06/18 22:17:53 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -102,18 +102,19 @@ __KERNEL_RCSID(0, "$NetBSD: cia.c,v 1.75 #include <alpha/pci/pci_1000.h> #endif -int ciamatch(device_t, cfdata_t, void *); -void ciaattach(device_t, device_t, void *); +static int ciamatch(device_t, cfdata_t, void *); +static void ciaattach(device_t, device_t, void *); CFATTACH_DECL_NEW(cia, sizeof(struct cia_softc), ciamatch, ciaattach, NULL, NULL); extern struct cfdriver cia_cd; -int cia_bus_get_window(int, int, struct alpha_bus_space_translation *); +static int cia_bus_get_window(int, int, + struct alpha_bus_space_translation *); /* There can be only one. */ -int ciafound; +static int ciafound; struct cia_config cia_configuration; /* @@ -147,7 +148,7 @@ int cia_pci_use_bwx = CIA_PCI_USE_BWX; int cia_bus_use_bwx = CIA_BUS_USE_BWX; int cia_pyxis_force_bwx = CIA_PYXIS_FORCE_BWX; -int +static int ciamatch(device_t parent, cfdata_t match, void *aux) { struct mainbus_attach_args *ma = aux; @@ -260,7 +261,7 @@ cia_init(struct cia_config *ccp, int mal ccp->cc_initted = 1; } -void +static void ciaattach(device_t parent, device_t self, void *aux) { struct cia_softc *sc = device_private(self); @@ -404,8 +405,9 @@ ciaattach(device_t parent, device_t self config_found(self, &pba, pcibusprint, CFARG_EOL); } -int -cia_bus_get_window(int type, int window, struct alpha_bus_space_translation *abst) +static int +cia_bus_get_window(int type, int window, + struct alpha_bus_space_translation *abst) { struct cia_config *ccp = &cia_configuration; bus_space_tag_t st; Index: src/sys/arch/alpha/pci/irongate.c diff -u src/sys/arch/alpha/pci/irongate.c:1.17 src/sys/arch/alpha/pci/irongate.c:1.18 --- src/sys/arch/alpha/pci/irongate.c:1.17 Sat Apr 24 23:36:23 2021 +++ src/sys/arch/alpha/pci/irongate.c Fri Jun 18 22:17:53 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: irongate.c,v 1.17 2021/04/24 23:36:23 thorpej Exp $ */ +/* $NetBSD: irongate.c,v 1.18 2021/06/18 22:17:53 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: irongate.c,v 1.17 2021/04/24 23:36:23 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: irongate.c,v 1.18 2021/06/18 22:17:53 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -57,8 +57,8 @@ __KERNEL_RCSID(0, "$NetBSD: irongate.c,v #include <alpha/pci/pci_up1000.h> #endif -int irongate_match(device_t, cfdata_t, void *); -void irongate_attach(device_t, device_t, void *); +static int irongate_match(device_t, cfdata_t, void *); +static void irongate_attach(device_t, device_t, void *); CFATTACH_DECL_NEW(irongate, sizeof(struct irongate_softc), irongate_match, irongate_attach, NULL, NULL); @@ -67,9 +67,10 @@ extern struct cfdriver irongate_cd; /* There can be only one. */ struct irongate_config irongate_configuration; -int irongate_found; +static int irongate_found; -int irongate_bus_get_window(int, int, struct alpha_bus_space_translation *); +static int irongate_bus_get_window(int, int, + struct alpha_bus_space_translation *); /* * Set up the chipset's function pointers. @@ -110,7 +111,7 @@ irongate_init(struct irongate_config *ic icp->ic_initted = 1; } -int +static int irongate_match(device_t parent, cfdata_t match, void *aux) { struct mainbus_attach_args *ma = aux; @@ -125,7 +126,7 @@ irongate_match(device_t parent, cfdata_t return (1); } -void +static void irongate_attach(device_t parent, device_t self, void *aux) { struct irongate_softc *sc = device_private(self); @@ -206,7 +207,7 @@ irongate_attach(device_t parent, device_ CFARG_EOL); } -int +static int irongate_bus_get_window(int type, int window, struct alpha_bus_space_translation *abst) { Index: src/sys/arch/alpha/pci/lca.c diff -u src/sys/arch/alpha/pci/lca.c:1.52 src/sys/arch/alpha/pci/lca.c:1.53 --- src/sys/arch/alpha/pci/lca.c:1.52 Sat Apr 24 23:36:23 2021 +++ src/sys/arch/alpha/pci/lca.c Fri Jun 18 22:17:53 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: lca.c,v 1.52 2021/04/24 23:36:23 thorpej Exp $ */ +/* $NetBSD: lca.c,v 1.53 2021/06/18 22:17:53 thorpej Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: lca.c,v 1.52 2021/04/24 23:36:23 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lca.c,v 1.53 2021/06/18 22:17:53 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -91,22 +91,22 @@ __KERNEL_RCSID(0, "$NetBSD: lca.c,v 1.52 #include <alpha/pci/pci_eb66.h> #endif -int lcamatch(device_t, cfdata_t, void *); -void lcaattach(device_t, device_t, void *); +static int lcamatch(device_t, cfdata_t, void *); +static void lcaattach(device_t, device_t, void *); CFATTACH_DECL_NEW(lca, sizeof(struct lca_softc), lcamatch, lcaattach, NULL, NULL); extern struct cfdriver lca_cd; -int lca_bus_get_window(int, int, - struct alpha_bus_space_translation *); +static int lca_bus_get_window(int, int, + struct alpha_bus_space_translation *); /* There can be only one. */ -int lcafound; struct lca_config lca_configuration; +static int lcafound; -int +static int lcamatch(device_t parent, cfdata_t match, void *aux) { struct mainbus_attach_args *ma = aux; @@ -181,7 +181,7 @@ lca_init(struct lca_config *lcp, int mal lcp->lc_initted = 1; } -void +static void lcaattach(device_t parent, device_t self, void *aux) { struct lca_softc *sc = device_private(self); @@ -189,7 +189,6 @@ lcaattach(device_t parent, device_t self struct pcibus_attach_args pba; /* note that we've attached the chipset; can't have 2 LCAs. */ - /* Um, not sure about this. XXX JH */ lcafound = 1; sc->sc_dev = self; @@ -240,8 +239,9 @@ lcaattach(device_t parent, device_t self config_found(self, &pba, pcibusprint, CFARG_EOL); } -int -lca_bus_get_window(int type, int window, struct alpha_bus_space_translation *abst) +static int +lca_bus_get_window(int type, int window, + struct alpha_bus_space_translation *abst) { struct lca_config *lcp = &lca_configuration; bus_space_tag_t st; Index: src/sys/arch/alpha/pci/mcpcia.c diff -u src/sys/arch/alpha/pci/mcpcia.c:1.31 src/sys/arch/alpha/pci/mcpcia.c:1.32 --- src/sys/arch/alpha/pci/mcpcia.c:1.31 Sat Apr 24 23:36:23 2021 +++ src/sys/arch/alpha/pci/mcpcia.c Fri Jun 18 22:17:53 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mcpcia.c,v 1.31 2021/04/24 23:36:23 thorpej Exp $ */ +/* $NetBSD: mcpcia.c,v 1.32 2021/06/18 22:17:53 thorpej Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: mcpcia.c,v 1.31 2021/04/24 23:36:23 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcpcia.c,v 1.32 2021/06/18 22:17:53 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -111,8 +111,8 @@ void mcpcia_init0(struct mcpcia_config * */ struct mcpcia_config mcpcia_console_configuration; -int mcpcia_bus_get_window(int, int, - struct alpha_bus_space_translation *abst); +static int mcpcia_bus_get_window(int, int, + struct alpha_bus_space_translation *abst); static int mcpciamatch(device_t parent, cfdata_t cf, void *aux) @@ -332,8 +332,9 @@ mcpcia_config_cleanup(void) #endif } -int -mcpcia_bus_get_window(int type, int window, struct alpha_bus_space_translation *abst) +static int +mcpcia_bus_get_window(int type, int window, + struct alpha_bus_space_translation *abst) { struct mcpcia_config *ccp = &mcpcia_console_configuration; bus_space_tag_t st;