Re: [PATCH] iio: ad_sigma_delta: Don't put SPI transfer buffer on the stack

2020-11-12 Thread Lars-Peter Clausen
On 11/12/20 11:14 AM, Alexandru Ardelean wrote: On Thu, Nov 12, 2020 at 11:55 AM Lars-Peter Clausen wrote: On 11/12/20 10:10 AM, Alexandru Ardelean wrote: From: Lars-Peter Clausen Use a heap allocated memory for the SPI transfer buffer. Using stack memory can corrupt stack memory when using

Re: [PATCH] iio: ad_sigma_delta: Don't put SPI transfer buffer on the stack

2020-11-12 Thread Alexandru Ardelean
On Thu, Nov 12, 2020 at 11:55 AM Lars-Peter Clausen wrote: > > On 11/12/20 10:10 AM, Alexandru Ardelean wrote: > > From: Lars-Peter Clausen > > > > Use a heap allocated memory for the SPI transfer buffer. Using stack memory > > can corrupt stack memory when using DMA on some systems. > > > >

Re: [PATCH] iio: ad_sigma_delta: Don't put SPI transfer buffer on the stack

2020-11-12 Thread Lars-Peter Clausen
On 11/12/20 10:10 AM, Alexandru Ardelean wrote: From: Lars-Peter Clausen Use a heap allocated memory for the SPI transfer buffer. Using stack memory can corrupt stack memory when using DMA on some systems. This change adds 4 bytes at the end of the current DMA buffer, which will be used by

[PATCH] iio: ad_sigma_delta: Don't put SPI transfer buffer on the stack

2020-11-12 Thread Alexandru Ardelean
From: Lars-Peter Clausen Use a heap allocated memory for the SPI transfer buffer. Using stack memory can corrupt stack memory when using DMA on some systems. This change adds 4 bytes at the end of the current DMA buffer, which will be used by the trigger handler. This is required because the