Re: [PATCH] iio: adxrs290: fix data signedness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 11, 2021 at 2:19 PM Nuno Sá <nuno.sa@xxxxxxxxxx> wrote:
>
> From: Kister Genesis Jimenez <kister.jimenez@xxxxxxxxxx>
>
> Properly sign-extend the rate and temperature data.

...

>         /* extract lower 12 bits temperature reading */
> -       *val = temp & 0x0FFF;
> +       *val = sign_extend32(temp & 0x0FFF, 11);

What role does the ' & 0x0FFF' part play now?
Isn't it simply a dup (redundant) piece?

-- 
With Best Regards,
Andy Shevchenko




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux