lkml.org 
[lkml]   [2009]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectata_sff_data_xfer* return value
Date
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


\
 
 \ /
  Last update: 2009-11-08 20:29    [from the cache]
©2003-2011 Jasper Spaans