FUJITA Tomonori wrote:
> From: Boaz Harrosh <[EMAIL PROTECTED]>
> Subject: Re: [PATCH v2] add bidi support for block pc requests
> Date: Thu, 24 May 2007 19:37:06 +0300
> 
>> FUJITA Tomonori wrote:
>>>> FUJITA Tomonori wrote:
>>> One thing that I found is:
>>>
>>> +#define scsi_resid(cmd) ((cmd)->sg_table->resid)
>>>
>>>
>>> This doesn't work for some drivers (at least ipr) since they set
>>> cmd->resid even with commands without data transfer.
>>>
>> James, Tomo.
>>
>> the last accessor:
>> +#define scsi_resid(cmd) ((cmd)->resid)
>>
>> used as an l-value in drivers does not serve our purpose, as seen by the test
>> implementation of scsi_sg_table. Now clearly this needs an accessor and it 
>> is a
>> bidi parameter (need 2 of them).
> 
> I thought that it would be better to fix several drivers (less than 10).

I prefer inlines.

One - Programmer cannot make mistakes. Why give him the freedom to something he
must not do?

two - if all/most drivers are doing:
if (scsi_sgl(cmd))
        scsi_resid(cmd) = 0;

Than will it not be better to do the if() inside the API?

Boaz

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to