]> git.baikalelectronics.ru Git - uboot.git/commit
sf: Avoid allocating memory on every read operation
authorSimon Glass <sjg@chromium.org>
Mon, 1 Oct 2018 18:22:09 +0000 (12:22 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 9 Oct 2018 10:40:27 +0000 (04:40 -0600)
commit1ecb9f125978a6ea0c098d1813a5668722ebcac5
treedf5e1506785829d0db8920625dee12e849106df7
parentf3f508005e4162acd1315f63c686984de01e222a
sf: Avoid allocating memory on every read operation

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@chromium.org>
drivers/mtd/spi/spi_flash.c