[U-Boot] [PATCH 05/45] sf: Avoid allocating memory on every read operation

sjg at google.com sjg at google.com
Tue Oct 9 23:55:34 UTC 2018


At present spi_flash_cmd_read_ops() allocates and frees a few bytes of
memory every time it is called. It is faster to use the stack for this
and this is now supported by the minimum GCC version required by U-Boot.

Remove the allocation and use a variable-sized array instead.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 drivers/mtd/spi/spi_flash.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

Applied to u-boot-dm


More information about the U-Boot mailing list