summaryrefslogtreecommitdiff
path: root/sys/arch/macppc/pci
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2002-09-06 13:44:04 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2002-09-06 13:44:04 +0000
commitfef04d296c9d04387f613eb1a5dfcedac5688d5b (patch)
treeb365ed5165cf7cf5233586882610af57f9471887 /sys/arch/macppc/pci
parentd89441eb982635eb18d841ed396ad6d7a3cc265d (diff)
KNF.
Diffstat (limited to 'sys/arch/macppc/pci')
-rw-r--r--sys/arch/macppc/pci/mpcpcibus.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/sys/arch/macppc/pci/mpcpcibus.c b/sys/arch/macppc/pci/mpcpcibus.c
index ac7a104ed31..4584a164095 100644
--- a/sys/arch/macppc/pci/mpcpcibus.c
+++ b/sys/arch/macppc/pci/mpcpcibus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpcpcibus.c,v 1.11 2002/07/23 17:53:25 drahn Exp $ */
+/* $OpenBSD: mpcpcibus.c,v 1.12 2002/09/06 13:44:03 drahn Exp $ */
/*
* Copyright (c) 1997 Per Fogelstrom
@@ -671,7 +671,7 @@ mpcpcibrprint(aux, pnp)
{
struct pcibus_attach_args *pba = aux;
- if(pnp)
+ if (pnp)
printf("%s at %s", pba->pba_busname, pnp);
printf(" bus %d", pba->pba_bus);
return(UNCONF);
@@ -710,20 +710,18 @@ of_ether_hw_addr(struct ppc_pci_chipset *lcpc, u_int8_t *oaddr)
struct pcibr_config *lcp = lcpc->pc_conf_v;
int of_node = lcp->node;
int node, nn;
- for (node = OF_child(of_node); node; node = nn)
- {
+ for (node = OF_child(of_node); node; node = nn) {
char name[32];
int len;
len = OF_getprop(node, "name", name,
sizeof(name));
name[len] = 0;
- if (sizeof (laddr) ==
- OF_getprop(node, "local-mac-address", laddr,
- sizeof laddr))
- {
+
+ len = OF_getprop(node, "local-mac-address", laddr,
+ sizeof laddr);
+ if (sizeof (laddr) == len) {
bcopy (laddr, oaddr, sizeof laddr);
return 1;
-
}
/* iterate section */
@@ -824,7 +822,7 @@ mpc_gen_config_reg(cpv, tag, offset)
/*
* config type 1
*/
- reg = tag | offset | 1;
+ reg = tag | offset | 1;
}
} else {
@@ -854,7 +852,7 @@ mpc_conf_read(cpv, tag, offset)
- if(offset & 3 || offset < 0 || offset >= 0x100) {
+ if (offset & 3 || offset < 0 || offset >= 0x100) {
#ifdef DEBUG_CONFIG
printf ("pci_conf_read: bad reg %x\n", offset);
#endif /* DEBUG_CONFIG */
@@ -864,7 +862,7 @@ mpc_conf_read(cpv, tag, offset)
reg = mpc_gen_config_reg(cpv, tag, offset);
/* if invalid tag, return -1 */
if (reg == 0xffffffff) {
- return 0xffffffff;
+ return(~0);
}
if ((cp->config_type & 2) && (offset & 0x04)) {
@@ -967,7 +965,7 @@ mpc_intr_map(lcv, bustag, buspin, line, ihp)
error = 1;
}
- if(!error)
+ if (!error)
*ihp = line;
return error;
}