Fix sparse warnings
Subsystems (5)
v2 cover Fix sparse warnings
Run and fix sparse warnings in below files
-arch/arm/mach-zynqmp/include/mach/sys_proto.h -common/spl/spl.c -arch/arm/mach-versal-net/include/mach/sys_proto.h -arch/arm/mach-versal/include/mach/sys_proto.h -drivers/mmc/zynq_sdhci.c -drivers/spi/zynqmp_gqspi.c
Changes in v2:
- Moved function prototype from sys_proto.h to include/spl.h
Algapally Santosh Sagar (2):
xilinx: zynqmp: Add missing prototype for zynqmp_mmio_write
xilinx: zynqmp: Add missing prototype for board_boot_order
arch/arm/mach-versal-net/include/mach/sys_proto.h | 7 +------ arch/arm/mach-versal/include/mach/sys_proto.h | 6 +----- drivers/mmc/zynq_sdhci.c | 1 + drivers/spi/zynqmp_gqspi.c | 5 +++++ include/spl.h | 1 + 5 files changed, 9 insertions(+), 11 deletions(-)
Signature · 1 line
2.17.1
PATCH v2 1/2 xilinx: zynqmp: Add missing prototype for zynqmp_mmio_write
From: Algapally Santosh Sagar <[email protected]>
Add missing prototype to fix the sparse warning, warning: no previous prototype for 'zynqmp_mmio_write' [-Wmissing-prototypes].
---
(no changes since v1)
arch/arm/mach-versal-net/include/mach/sys_proto.h | 7 +------ arch/arm/mach-versal/include/mach/sys_proto.h | 6 +----- drivers/mmc/zynq_sdhci.c | 1 + drivers/spi/zynqmp_gqspi.c | 5 +++++ 4 files changed, 8 insertions(+), 11 deletions(-)
arch/arm/mach-versal-net/include/mach/sys_proto.h +1 -6
@@ -8,9 +8,4 @@void mem_map_fill (void ); -static inline int zynqmp_mmio_write (const u32 address,const u32 mask, -const u32 value) -{ -BUILD_BUG (); -return -EINVAL ; -} +int zynqmp_mmio_write (const u32 address,const u32 mask,const u32 value);
arch/arm/mach-versal/include/mach/sys_proto.h +1 -5
@@ -13,8 +13,4 @@ enum {void tcm_init (u8 mode);void mem_map_fill (void ); -static inline int zynqmp_mmio_write (const u32 address,const u32 mask,const u32 value) -{ -BUILD_BUG (); -return -EINVAL ; -} +int zynqmp_mmio_write (const u32 address,const u32 mask,const u32 value);
drivers/mmc/zynq_sdhci.c +1 -0
@@ -14,6 +14,7 @@#include "mmc_private.h" #include <log.h> #include <reset.h> +#include <asm/arch/sys_proto.h> #include <dm/device_compat.h> #include <linux/err.h> #include <linux/libfdt.h>
drivers/spi/zynqmp_gqspi.c +5 -0
@@ -183,6 +183,11 @@ struct zynqmp_qspi_priv {const struct spi_mem_op *op; }; +__weak int zynqmp_mmio_write (const u32 address,const u32 mask,const u32 value) +{ +return 0 ; +} +static int zynqmp_qspi_of_to_plat (struct udevice *bus) {struct zynqmp_qspi_plat *plat =dev_get_plat (bus);
Signature · 1 line
2.17.1
PATCH v2 2/2 xilinx: zynqmp: Add missing prototype for board_boot_order
In reply to Ashok Reddy SomaFrom: Algapally Santosh Sagar <[email protected]>
Add missing prototype to fix the sparse warning, warning: no previous prototype for 'board_boot_order' [-Wmissing-prototypes].
---
Changes in v2:
- Moved function prototype from sys_proto.h to include/spl.h
include/spl.h | 1 + 1 file changed, 1 insertion(+)
include/spl.h +1 -0
@@ -884,5 +884,6 @@ void spl_perform_fixups(struct spl_image_info *spl_image);*/ struct legacy_img_hdr *spl_get_load_buffer (ssize_t offset,size_t size); +void board_boot_order (u32 *spl_boot_list);void spl_save_restore_data (void );#endif
Signature · 1 line
2.17.1
Michal Simek
maintainerRe: [PATCH v2 2/2] xilinx: zynqmp: Add missing prototype for board_boot_order
Hi,
Quoted 20 lines · Ashok Reddy Soma
From: Algapally Santosh Sagar <[email protected]>
Add missing prototype to fix the sparse warning, warning: no previous prototype for '
board_boot_order' [-Wmissing-prototypes].Signed-off-by Algapally Santosh Sagar <[email protected]>Signed-off-by Ashok Reddy Soma <[email protected]>---
Changes in v2:
- Moved function prototype fromsys_proto.htoinclude/spl.hinclude/spl.h | 1 + 1 file changed, 1 insertion(+)include/spl.h +0
-0
include/spl.h void spl_perform_fixups(struct spl_image_info *spl_image); · line 889
Quoted 6 lines
include/spl.h +1
-0@@ -884,5 +884,6 @@ void spl_perform_fixups(struct spl_image_info *spl_image);*/ struct legacy_img_hdr *spl_get_load_buffer (ssize_t offset,size_t size); +void board_boot_order (u32 *spl_boot_list);void spl_save_restore_data (void );#endif
The patch is fine but subject not.
Should be something like
spl: Add missing prototype for board_boot_order
M