From: Pavel Machek <pavel@ucw.cz>
To: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Cc: linux-ide@vger.intel.com, linux-kernel@vger.kernel.org,
jgarzik@pobox.com, rdunlap@xenotime.net
Subject: Re: [patch 2/2] libata: _SDD support
Date: Mon, 2 Oct 2006 15:08:27 +0200 [thread overview]
Message-ID: <20061002130827.GB13617@elf.ucw.cz> (raw)
In-Reply-To: <20060928112912.d2ae0d8f.kristen.c.accardi@intel.com>
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@intel.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
next prev parent reply other threads:[~2006-10-02 13:08 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20060928182211.076258000@localhost.localdomain>
2006-09-28 18:29 ` [patch 1/2] libata: _GTF support Kristen Carlson Accardi
2006-09-28 18:51 ` Diego Calleja
2006-09-28 20:32 ` Jeff Garzik
2006-09-28 20:39 ` Jeff Garzik
2006-09-29 2:07 ` Matthew Garrett
2006-09-29 16:54 ` Kristen Carlson Accardi
2006-09-29 17:04 ` Randy Dunlap
2006-09-29 17:03 ` Kristen Carlson Accardi
2006-10-01 17:02 ` Andrey Borzenkov
2006-10-02 16:45 ` Kristen Carlson Accardi
2006-10-02 13:06 ` Pavel Machek
2006-09-28 18:29 ` [patch 2/2] libata: _SDD support Kristen Carlson Accardi
2006-09-29 2:13 ` Matthew Garrett
2006-09-30 0:33 ` Kristen Carlson Accardi
2006-11-11 0:14 ` [patch] libata: change order of _SDD/_GTF execution (resend #3) Kristen Carlson Accardi
2006-11-14 19:19 ` Jeff Garzik
2006-10-02 13:08 ` Pavel Machek [this message]
2006-09-28 18:29 ` [patch 1/2] libata: _GTF support Kristen Carlson Accardi
2006-09-28 18:30 ` Kristen Carlson Accardi
2006-09-28 18:30 ` [patch 2/2] libata: _SDD support Kristen Carlson Accardi
2006-09-29 17:56 ` Valdis.Kletnieks
[not found] <20060927223441.205181000@localhost.localdomain>
2006-09-27 22:36 ` Kristen Carlson Accardi
2006-09-27 22:54 ` Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061002130827.GB13617@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=jgarzik@pobox.com \
--cc=kristen.c.accardi@intel.com \
--cc=linux-ide@vger.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@xenotime.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®