From: Krzysztof Halasa <khc@pm.waw.pl>
To: linux-ide@vger.kernel.org, lkml <linux-kernel@vger.kernel.org>
Subject: ata_sff_data_xfer* return value
Date: Sun, 08 Nov 2009 20:27:02 +0100 [thread overview]
Message-ID: <m37hu0bywp.fsf@intrepid.localdomain> (raw)
Hi,
I wonder if this is entirely correct? If so, why?
Only relevant parts left.
* RETURNS:
* Bytes consumed.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
*/
unsigned int ata_sff_data_xfer(struct ata_device *dev, unsigned char *buf,
unsigned int buflen, int rw)
{
unsigned int words = buflen >> 1;
...
/* Transfer trailing byte, if any. */
if (unlikely(buflen & 0x01)) {
...
words++;
}
return words << 1;
same here:
unsigned int ata_sff_data_xfer32(struct ata_device *dev, unsigned char *buf,
unsigned int buflen, int rw)
{
...
return (buflen + 1) & ~1;
Please keep me in CC:, I'm not on the IDE list. Thanks.
--
Krzysztof Halasa
next reply other threads:[~2009-11-08 19:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-08 19:27 Krzysztof Halasa [this message]
2009-11-08 20:00 ` ata_sff_data_xfer* return value Alan Cox
2009-11-08 20:06 ` Krzysztof Halasa
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=m37hu0bywp.fsf@intrepid.localdomain \
--to=khc@pm.waw.pl \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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