]> git.baikalelectronics.ru Git - uboot.git/commit
common: update: fix an "unused" warning against update_flash()
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Thu, 19 Nov 2020 00:37:19 +0000 (09:37 +0900)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 3 Dec 2020 20:22:49 +0000 (21:22 +0100)
commit858ed618da2a3827a009a7cb90982d674f94e38e
tree1de6ba6b47afea6917ee2eeef9886bf48a147ebc
parentaabe1b0aa44467043ce8e1551cfb115c043c48d7
common: update: fix an "unused" warning against update_flash()

Since update_flash() is used only in update_tftp(), it should be
guarded with appropriate config options.

After the commit 5d45c4cdbc9f, common/update.c will be built under
either CONFIG_UDATE_TFTP, CONFIG_DFU_TFTP or CONFIG_UPDATE_FIT.
Since CONFIG_UPDATE_FIT, hence fit_update(), doesn't rely on
update_flash(), the compiler may cause an "unused" warning if
CONFIG_UPDATE_FIT=y and CONFIG_UPDATE_TFTP=n and CONFIG_DFU_TFTP=n.

This is, for example, the case for sandbox defconfig where
EFI_CAPSULE_FIRMWARE_FIT is enabled for test purpose.

Fixes: 5d45c4cdbc9f ("common: update: add a generic interface for FIT
       image")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
common/update.c