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

From: Andy Shevchenko

Date: Mon May 04 2026 - 04:41:58 EST


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@xxxxxxxxxx> wrote:
> >On Sun, 26 Apr 2026 14:47:10 +0530
> >Sanjay Chitroda <sanjayembeddedse@xxxxxxxxx> 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