No, this is a conversion from complement to signed integer.

Sonic 

>-----Original Message-----
>From: Mike Frysinger [mailto:[email protected]] 
>Sent: Friday, April 02, 2010 10:28 AM
>To: [email protected]
>Cc: [email protected]
>Subject: Re: [Linux-kernel-commits] [8590] 
>trunk/drivers/staging/iio/adc/ad7414.c: Task[#5912] Remove 
>warning in ad7414 driver.
>
>On Thu, Apr 1, 2010 at 22:26,  <[email protected]> wrote:
>>      if (data & AD7414_T_SIGN)
>> -            data = data&(~AD7414_T_SIGN) - AD7414_T_SIGN;
>> +            data = (data&(~AD7414_T_SIGN)) - AD7414_T_SIGN;
>
>seems like it should (cosmetically) be:
>  data = (data & ~AD7414_T_SIGN) - AD7414_T_SIGN;
>
>although at a quick glance, this code doesnt seem to make much 
>sense without understanding what is going on.  data starts off 
>as an apparent bit field, but then gets masked and subtracted 
>?  or are you trying to implement saturation ?
>-mike
>
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to