Re: [PATCH 1/3] fpga: Add Efinix Trion & Titanium serial SPI programming driver

From: Xu Yilun
Date: Thu Oct 17 2024 - 21:26:02 EST


> > +static int efinix_spi_apply_clk_cycles(struct efinix_spi_conf *conf)
> > +{
> > + char data[13] = {0};
> > +
> > + return spi_write(conf->spi, data, sizeof(data));
>
> Hm, aren't buffers from stack discouraged? spi-summary explicitly
> mentions this case or I am getting this wrong?

You are right. And there were already some fixes for this issue in FPGA. E.g.

https://lore.kernel.org/all/20221230092922.18822-2-i.bornyakov@xxxxxxxxxxx/

Thanks,
Yilun