lkml.org 
[lkml]   [2004]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: drivers/block/ub.c
On Sun, Jun 27, 2004 at 12:59:04AM +0200, Oliver Neukum wrote:

>>>>+ cmd->cdb[2] = block >> 24;
>>>>+ cmd->cdb[3] = block >> 16;
>>>>+ cmd->cdb[4] = block >> 8;
>>>>+ cmd->cdb[5] = block;
>>>
>>> we have macros for that.
>>>
>>>>+ cmd->cdb[7] = nblks >> 8;
>>>>+ cmd->cdb[8] = nblks;
>>>
>>> dito
>>
>> Yes, we have macros. Using those macros would not at all be an improvement here.
>
> How do you arrive at that unusual conclusion?

The above writes clearly and simply what one wants.
I expect that you propose writing

*((u32 *)(cmd->cdb + 2)) = cpu_to_be32(block);

or some similar unspeakable ugliness.
If you had something else in mind, please reveal what.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.229 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site