Searched hist:"6 cc5f5cc85e42d4816fc46aa361319525e721f8b" (Results 1 – 1 of 1) sorted by relevance
| /rk3399_rockchip-uboot/drivers/spi/ |
| H A D | spi-mem.c | 6cc5f5cc85e42d4816fc46aa361319525e721f8b Sat May 18 17:59:54 UTC 2019 Simon Glass <sjg@chromium.org> UPSTREAM: spi: Avoid using malloc() in a critical function
In general we should avoid calling malloc() and free() repeatedly in U-Boot lest we turn it into tianocore. In SPL this can make SPI flash unusable since free() is often a nop and allocation space is limited.
In any case, these seems no need for malloc() since the number of bytes is very small, perhaps less than 8.
Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: d13f5b254a (spi: Extend the core to ease integration of SPI memory controllers) Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit ca2abb75a086d8b0bdb51689f331ba8f1a146379) Change-Id: Ia76abf7491780b1984eb81c6c78796bcc0141095
|