spi: spi-mem: check if data buffers are on stack
The buffers passed in the data phase must be DMA-able. Programmers often don't realise this requirement and pass in buffers that reside on the stack. This can be hard to spot when reviewing code. Reject ops if their data buffer is on the stack to avoid this. Signed-off-by: NPratyush Yadav <p.yadav@ti.com> Link: https://lore.kernel.org/r/20220420102022.3310970-1-p.yadav@ti.comSigned-off-by: NMark Brown <broonie@kernel.org>
Showing
想要评论请 注册 或 登录