summaryrefslogtreecommitdiff
path: root/os/boot/pc/sd53c8xx.c
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2008-06-11 14:21:44 +0000
committerCharles.Forsyth <devnull@localhost>2008-06-11 14:21:44 +0000
commit8a8c2d742b51525f66c2210e3c8a251de10022ff (patch)
tree8282ce595e5fbe2e487dc20f54891d9e9e7cbf37 /os/boot/pc/sd53c8xx.c
parent31a18a6996a6b5927e39cc553696c167e6c88e3d (diff)
20080611-1520
Diffstat (limited to 'os/boot/pc/sd53c8xx.c')
-rw-r--r--os/boot/pc/sd53c8xx.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/os/boot/pc/sd53c8xx.c b/os/boot/pc/sd53c8xx.c
index b9dc3e9a..cc47edf0 100644
--- a/os/boot/pc/sd53c8xx.c
+++ b/os/boot/pc/sd53c8xx.c
@@ -1864,28 +1864,32 @@ static Variant variant[] = {
{ SYM_1011_DID, 0xff, "SYM53C1010", Burst128, 16, 64, Prefetch|LocalRAM|BigFifo|Wide|Ultra|Ultra2 },
};
-#define offsetof(s, t) ((ulong)&((s *)0)->t)
static int
xfunc(Controller *c, enum na_external x, unsigned long *v)
{
- switch (x)
- {
+ switch (x) {
+ default:
+ print("xfunc: can't find external %d\n", x);
+ return 0;
case X_scsi_id_buf:
- *v = offsetof(Dsa, scsi_id_buf[0]); return 1;
+ *v = offsetof(Dsa, scsi_id_buf[0]);
+ break;
case X_msg_out_buf:
- *v = offsetof(Dsa, msg_out_buf); return 1;
+ *v = offsetof(Dsa, msg_out_buf);
+ break;
case X_cmd_buf:
- *v = offsetof(Dsa, cmd_buf); return 1;
+ *v = offsetof(Dsa, cmd_buf);
+ break;
case X_data_buf:
- *v = offsetof(Dsa, data_buf); return 1;
+ *v = offsetof(Dsa, data_buf);
+ break;
case X_status_buf:
- *v = offsetof(Dsa, status_buf); return 1;
+ *v = offsetof(Dsa, status_buf);
+ break;
case X_dsa_head:
- *v = DMASEG(&c->dsalist.head[0]); return 1;
- default:
- print("xfunc: can't find external %d\n", x);
- return 0;
+ *v = DMASEG(&c->dsalist.head[0]);
+ break;
}
return 1;
}
@@ -1960,7 +1964,7 @@ sympnp(void)
}
if(v >= &variant[nelem(variant)])
continue;
- print("sd53c8xx: %s rev. 0x%2.2x intr=%d command=%4.4luX\n",
+ print("sd53c8xx: %s rev. 0x%2.2x intr=%d command=%4.4uX\n",
v->name, p->rid, p->intl, p->pcr);
regpa = p->mem[1].bar;