Garrett D'Amore 写道:
> Garrett D'Amore wrote:
>   
>> Peter Memishian wrote:
>>     
>>>  > I'm not sure I understand what you're suggesting.
>>>  >  > Are you suggesting that I just drop this issue on the floor, 
>>> and abandon  > the attempt to clean this up?
>>>
>>> I'm suggesting that we placate lint through whatever means necessary, 
>>> but
>>> keep the existing signature and semantics of the macros.  When we have
>>> more time, other things like having the macros check for malformed
>>> messages could be investigated.  That work would need to include either
>>> collecting data demonstrating that adding those checks will still 
>>> yield a
>>> stable DEBUG system, or fixing bugs so that the system remains stable.
>>> Only with the checks in-place would I feel comfortable changing the 
>>> macros
>>> to return unsigned values, but even then I question the point, as I'm
>>> unaware of a pressing need to have a single mblk with 2^31 bytes of 
>>> data.
>>>   
>>>       
>> So, doing the math in unsigned integers, and then casting back to a 
>> signed type would be OK, right?  E.g.
>>
>>    #define   MBLKL(mp)   (intptr_t)((uintptr_t)(mp)->b_wptr - 
>> (uintptr_t)(mp)->b_rptr))
>>
>>     
I like this closure very much, especially casting back to the signed 
type again.
I hope that you folks don't mind that I cut-n-paste this to CR 6718935 
including
the rationales. I like capture the key ideas and careful thoughts behind 
this
fix.
>> Despite what the man page says, I don't want to cast to an (int), 
>> because that would represent loss of data, where the old code didn't 
>> lose it.
>>
>>    -- Garrett
>>
>>
>>
>>     
>
> So the new webrev is posted at 
> http://cr.opensolaris.org/~gdamore/mblkl/  once I get confirmation, 
> especially from meem, then I'll go ahead and submit the RTI.
>
>     -- Garrett
>
>
>
> _______________________________________________
> driver-discuss mailing list
> [EMAIL PROTECTED]
> http://mail.opensolaris.org/mailman/listinfo/driver-discuss
>   

-- 
Tzongyu Paul Lee, [EMAIL PROTECTED] or [EMAIL PROTECTED]
BJS05 7225, x84343
http://blogs.sun.com/tpaullee/  Feel the Pulses of China
http://tpaullee.blogspot.com/ - use google reader in China

_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to