Re: [PATCH v7 9/9] iio: ssp_sensors: reuse embedded RX buffer for SPI transfers

Andy Shevchenko
2026-05-04T08:41:41Z

On Sun, May 03, 2026 at 07:47:03PM +0530, Sanjay Chitroda wrote:
> On 26 April 2026 8:05:40 pm IST, Jonathan Cameron <jic23@kernel.org> wrote:
> >On Sun, 26 Apr 2026 14:47:10 +0530
> >Sanjay Chitroda <sanjayembeddedse@gmail.com> wrote:

...

> >> case SSP_HUB2AP_WRITE:
> >> - buffer = kzalloc(length, GFP_KERNEL | GFP_DMA);
> >Is there any chance that GFP_DMA marking is needed?
>
> As per my understanding, this must be legacy flag as there is no direct use
> of any dma_* API. marking should be redundant and safe to drop.

But what does this case with HW? It seems the use of this memory is in
spi_read() and SPI framework for sure does dma_*() APIs. Would it be
problematic?

> >> - if (!buffer)
> >> - return -ENOMEM;

--
With Best Regards,
Andy Shevchenko