Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sandpoint/stand/altboot Make the chipfix() function...
details: https://anonhg.NetBSD.org/src/rev/dea15cbb3c12
branches: trunk
changeset: 771156:dea15cbb3c12
user: phx <phx%NetBSD.org@localhost>
date: Sun Nov 13 00:06:54 2011 +0000
description:
Make the chipfix() functions return void instead of int, as the return
value is useless. Suggested by nisimura.
diffstat:
sys/arch/sandpoint/stand/altboot/pciide.c | 25 +++++++++----------------
1 files changed, 9 insertions(+), 16 deletions(-)
diffs (80 lines):
diff -r b9c003d0e6f6 -r dea15cbb3c12 sys/arch/sandpoint/stand/altboot/pciide.c
--- a/sys/arch/sandpoint/stand/altboot/pciide.c Sat Nov 12 23:57:55 2011 +0000
+++ b/sys/arch/sandpoint/stand/altboot/pciide.c Sun Nov 13 00:06:54 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pciide.c,v 1.10 2011/11/12 16:56:12 phx Exp $ */
+/* $NetBSD: pciide.c,v 1.11 2011/11/13 00:06:54 phx Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -35,14 +35,14 @@
#include "globals.h"
-static int cmdidefix(struct dkdev_ata *);
-static int apoidefix(struct dkdev_ata *);
-static int iteidefix(struct dkdev_ata *);
+static void cmdidefix(struct dkdev_ata *);
+static void apoidefix(struct dkdev_ata *);
+static void iteidefix(struct dkdev_ata *);
static uint32_t pciiobase = PCI_XIOBASE;
struct myops {
- int (*chipfix)(struct dkdev_ata *);
+ void (*chipfix)(struct dkdev_ata *);
int (*presense)(struct dkdev_ata *, int);
};
static struct myops defaultops = { NULL, NULL };
@@ -93,8 +93,7 @@
/* chipset specific fixes */
if (myops->chipfix)
- if (!(*myops->chipfix)(l))
- return NULL;
+ (*myops->chipfix)(l);
val = pcicfgread(tag, PCI_CLASS_REG);
native = PCI_CLASS(val) != PCI_CLASS_IDE ||
@@ -142,7 +141,7 @@
return l;
}
-static int
+static void
cmdidefix(struct dkdev_ata *l)
{
unsigned v;
@@ -155,11 +154,9 @@
pcicfgwrite(l->tag, 0xa4, (v & ~0xffff) | 0x328a);
v = pcicfgread(l->tag, 0xb4);
pcicfgwrite(l->tag, 0xb4, (v & ~0xffff) | 0x328a);
-
- return 1;
}
-static int
+static void
apoidefix(struct dkdev_ata *l)
{
unsigned v;
@@ -167,11 +164,9 @@
/* enable primary and secondary channel */
v = pcicfgread(l->tag, 0x40) & ~0x03;
pcicfgwrite(l->tag, 0x40, v | 0x03);
-
- return 1;
}
-static int
+static void
iteidefix(struct dkdev_ata *l)
{
unsigned v;
@@ -183,6 +178,4 @@
/* i/o configuration, enable channels, cables, IORDY */
v = pcicfgread(l->tag, 0x40);
pcicfgwrite(l->tag, 0x40, (v & ~0xffffff) | 0x36a0f3);
-
- return 1;
}
Home |
Main Index |
Thread Index |
Old Index