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 <[email protected]>
>
> + 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]