Re: [PATCH v2 05/17] staging: iio: cdc: ad7746: Use local buffer for multi byte reads.

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

 



On Sun, Jun 19, 2022 at 8:59 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
>
> From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
>
> I2C does not require DMA safe buffers so there is no need to ensure
> the buffers are in their own cacheline. Hence simplify things by
> using a local variable instead of embedding the buffer in the chip
> info structure.

...

>                                                     sizeof(chip->data),
>                                                     chip->data);

How will these compile? Or am I missing something?

> -
>                 if (ret < 0)
>                         goto out;
>
> -               *val = get_unaligned_be24(chip->data) - 0x800000;
> +               *val = get_unaligned_be24(data) - 0x800000;

-- 
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