From ede0f136dfe5a4dacfdb55fed664114ab9302bb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Schmidt?= <sos@FreeBSD.org> Date: Fri, 5 Apr 2002 18:04:05 +0000 Subject: [PATCH] Cleanups. --- sys/dev/ata/ata-disk.c | 12 ++++++------ sys/dev/ata/atapi-cd.c | 7 +------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c index b4dbf87a3011..5a72220058a1 100644 --- a/sys/dev/ata/ata-disk.c +++ b/sys/dev/ata/ata-disk.c @@ -125,8 +125,8 @@ ad_attach(struct ata_device *atadev) adp->total_secs = atadev->param->cylinders * adp->heads * adp->sectors; bioq_init(&adp->queue); - lbasize = (u_int32_t)atadev->param->lba_size_lo | - ((u_int32_t)atadev->param->lba_size_hi << 16); + lbasize = (u_int32_t)atadev->param->lba_size_1 | + ((u_int32_t)atadev->param->lba_size_2 << 16); /* does this device need oldstyle CHS addressing */ if (!ad_version(atadev->param->version_major) || @@ -137,10 +137,10 @@ ad_attach(struct ata_device *atadev) if (atadev->param->cylinders == 16383 && adp->total_secs < lbasize) adp->total_secs = lbasize; - lbasize48 = (u_int64_t)atadev->param->lba_size48_1 | - ((u_int64_t)atadev->param->lba_size48_2 << 16) | - ((u_int64_t)atadev->param->lba_size48_3 << 32) | - ((u_int64_t)atadev->param->lba_size48_4 << 48); + lbasize48 = ((u_int64_t)atadev->param->lba_size48_1) | + ((u_int64_t)atadev->param->lba_size48_2 << 16) | + ((u_int64_t)atadev->param->lba_size48_3 << 32) | + ((u_int64_t)atadev->param->lba_size48_4 << 48); /* use the 48bit LBA size if valid */ if (atadev->param->support.address48 && lbasize48 > 268435455) diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c index 40184018284b..da46d7778718 100644 --- a/sys/dev/ata/atapi-cd.c +++ b/sys/dev/ata/atapi-cd.c @@ -255,22 +255,17 @@ acd_init_lun(struct ata_device *atadev) return cdp; } -/* - * Handle dev_clone events, so that acd can be used as root device. - */ static void acd_clone(void *arg, char *name, int namelen, dev_t *dev) { - struct acd_softc *cdp; + struct acd_softc *cdp = arg; char *p; int unit; - cdp = arg; if (*dev != NODEV) return; if (!dev_stdclone(name, &p, "acd", &unit)) return; - /* Handle compatability slices. */ if (*p != '\0' && strcmp(p, "a") != 0 && strcmp(p, "c") != 0) return; if (unit == cdp->lun)