[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20061002130827.GB13617@elf.ucw.cz>
Date: Mon, 2 Oct 2006 15:08:27 +0200
From: Pavel Machek <pavel@....cz>
To: Kristen Carlson Accardi <kristen.c.accardi@...el.com>
Cc: linux-ide@...r.intel.com, linux-kernel@...r.kernel.org,
jgarzik@...ox.com, rdunlap@...otime.net
Subject: Re: [patch 2/2] libata: _SDD support
Hi!
> _SDD (Set Device Data) is an ACPI method that is used to tell the
> firmware what the identify data is of the device that is attached to
> the port. It is an optional method, and it's ok for it to be missing.
> Because of this, we always return success from the routine that calls
> this method, even if the execution fails.
>
> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@...el.com>
>
> + if (noacpi)
> + return 0;
That variable needs better name, too.
> + /* Don't continue if not a SATA device. */
> + if (!(ap->cbl == ATA_CBL_SATA)) {
Can we just use != ?
> + err = ACPI_FAILURE(status) ? -EIO : 0;
> + if (err < 0) {
> + if (ata_msg_probe(ap))
> + ata_dev_printk(atadev, KERN_DEBUG,
> + "ata%u(%u): %s _SDD error: status = 0x%x\n",
> + ap->id, ap->device->devno,
> + __FUNCTION__, status);
> + }
err is unused, you always return 0; can we do if (ACPI_FAILURE()) instead?
> + /* always return success */
> +out:
> + return 0;
> +}
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists