From: Prasad Kummari Date: Thu, 5 Sep 2024 11:57:59 +0000 (+0530) Subject: xilinx: versal-net: fix no previous prototype for function warning. X-Git-Url: http://git.dujemihanovic.xyz/%22/img/sics.gif/%22/static/git-favicon.png?a=commitdiff_plain;h=76197b6abb98d3f693c12f4346a91201e93fd1f8;p=u-boot.git xilinx: versal-net: fix no previous prototype for function warning. Included the SPI header to resolve the no previous prototypes for function. Removed unused mode variable. sparse warnings warning: no previous prototype for 'spi_get_env_dev' [-Wmissing-prototypes] warning: variable 'mode' set but not used [-Wunused-but-set-variable] Signed-off-by: Prasad Kummari Link: https://lore.kernel.org/r/20240905115758.999936-1-prasad.kummari@amd.com Signed-off-by: Michal Simek --- diff --git a/board/xilinx/versal-net/board.c b/board/xilinx/versal-net/board.c index 1d67e3f318..4d5913cff1 100644 --- a/board/xilinx/versal-net/board.c +++ b/board/xilinx/versal-net/board.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -196,7 +197,6 @@ static u8 versal_net_get_bootmode(void) int spi_get_env_dev(void) { struct udevice *dev; - const char *mode = NULL; int bootseq = -1; switch (versal_net_get_bootmode()) { @@ -207,7 +207,6 @@ int spi_get_env_dev(void) debug("QSPI driver for QSPI device is not present\n"); break; } - mode = "xspi"; bootseq = dev_seq(dev); break; case QSPI_MODE_32BIT: @@ -217,7 +216,6 @@ int spi_get_env_dev(void) debug("QSPI driver for QSPI device is not present\n"); break; } - mode = "xspi"; bootseq = dev_seq(dev); break; case OSPI_MODE: @@ -227,7 +225,6 @@ int spi_get_env_dev(void) debug("OSPI driver for OSPI device is not present\n"); break; } - mode = "xspi"; bootseq = dev_seq(dev); break; default: