summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2009-03-03 16:52:26 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2009-03-03 16:52:26 +0000
commit67b4c71c5f4eb93cde727d75cdb065ede2caa3e9 (patch)
treeb24e23528b8ed7c2bccc1d0114e39d7c8ec73423 /sys/dev/pci
parent03f32476187e8858467c286465bc61232a3738d5 (diff)
shorten sizes of variables to the required number of bits, and remove
unused variables, tested by todd ok kettenis
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/puc.c6
-rw-r--r--sys/dev/pci/pucvar.h9
2 files changed, 7 insertions, 8 deletions
diff --git a/sys/dev/pci/puc.c b/sys/dev/pci/puc.c
index 35e736c1d9d..ad37194ceb8 100644
--- a/sys/dev/pci/puc.c
+++ b/sys/dev/pci/puc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: puc.c,v 1.13 2007/12/04 21:49:35 kettenis Exp $ */
+/* $OpenBSD: puc.c,v 1.14 2009/03/03 16:52:25 deraadt Exp $ */
/* $NetBSD: puc.c,v 1.3 1999/02/06 06:29:54 cgd Exp $ */
/*
@@ -199,7 +199,6 @@ puc_pci_attach(struct device *parent, struct device *self, void *aux)
0, &sc->sc_bar_mappings[i].t, &sc->sc_bar_mappings[i].h,
&sc->sc_bar_mappings[i].a, &sc->sc_bar_mappings[i].s, 0)
== 0);
- sc->sc_bar_mappings[i].type = type;
if (sc->sc_bar_mappings[i].mapped)
continue;
@@ -345,7 +344,8 @@ puc_submatch(struct device *parent, void *vcf, void *aux)
}
const struct puc_device_description *
-puc_find_description(u_long vend, u_long prod, u_long svend, u_long sprod)
+puc_find_description(u_int16_t vend, u_int16_t prod,
+ u_int16_t svend, u_int16_t sprod)
{
int i;
diff --git a/sys/dev/pci/pucvar.h b/sys/dev/pci/pucvar.h
index 6b6fc292467..26c624fbd3f 100644
--- a/sys/dev/pci/pucvar.h
+++ b/sys/dev/pci/pucvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pucvar.h,v 1.6 2007/12/04 21:49:35 kettenis Exp $ */
+/* $OpenBSD: pucvar.h,v 1.7 2009/03/03 16:52:25 deraadt Exp $ */
/* $NetBSD: pucvar.h,v 1.2 1999/02/06 06:29:54 cgd Exp $ */
/*
@@ -41,8 +41,8 @@
#define PUC_MAX_PORTS 8
struct puc_device_description {
- u_long rval[4];
- u_long rmask[4];
+ u_int16_t rval[4];
+ u_int16_t rmask[4];
struct {
u_char type;
u_char bar;
@@ -97,7 +97,6 @@ struct puc_softc {
/* card-global dynamic data */
struct {
int mapped;
- u_long type;
bus_addr_t a;
bus_size_t s;
bus_space_tag_t t;
@@ -113,7 +112,7 @@ struct puc_softc {
};
const struct puc_device_description *
- puc_find_description(u_long, u_long, u_long, u_long);
+ puc_find_description(u_int16_t, u_int16_t, u_int16_t, u_int16_t);
void puc_print_ports(const struct puc_device_description *);
void puc_common_attach(struct puc_softc *, struct puc_attach_args *);
int puc_print(void *, const char *);