ARM: clean up declarations of public functions
Subsystems (3)
cover ARM: clean up declarations of public functions
This series of patches addresses a number of "Should it be static?" warnings from make when invoked with C=1.
Eric Nelson (4):
ARM: prevent compiler warnings from bootm.c
ARM: i.MX6: include prototype for get_board_rev()
ARM: i.MX: provide declaration for board_spi_cs_gpio
ARM: i.MX video: declare displays and display_count publicly
arch/arm/cpu/armv7/mx6/soc.c | 1 + arch/arm/imx-common/video.c | 3 --- arch/arm/include/asm/imx-common/spi.h | 17 +++++++++++++++++ arch/arm/include/asm/imx-common/video.h | 5 +++++ arch/arm/lib/bootm.c | 5 ++++- board/boundary/nitrogen6x/nitrogen6x.c | 1 + board/compulab/cm_fx6/common.c | 1 + board/embest/mx6boards/mx6boards.c | 1 + board/freescale/mx6qsabreauto/mx6qsabreauto.c | 1 + board/freescale/mx6slevk/mx6slevk.c | 1 + board/gateworks/gw_ventana/gw_ventana.c | 1 + board/genesi/mx51_efikamx/efikamx.c | 1 + board/ttcontrol/vision2/vision2.c | 1 + drivers/spi/mxc_spi.c | 1 + 14 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 arch/arm/include/asm/imx-common/spi.h
Signature · 1 line
1.9.1
PATCH 1/4 ARM: prevent compiler warnings from bootm.c
Without preceding declarations, "make C=1" generates "Should it be static?" warnings for symbols
do_bootm_linux,
boot_prep_vxworks, and boot_jump_vxworks
Include of bootm.h also identified a signature mismatch (const on argv[]).
--- arch/arm/lib/bootm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm/lib/bootm.c +4 -1
@@ -22,6 +22,8 @@#include <asm/bootm.h> #include <asm/secure.h> #include <linux/compiler.h> +#include <bootm.h> +#include <vxworks.h> #if defined(CONFIG_ARMV7_NONSEC ) || defined(CONFIG_ARMV7_VIRT )#include <asm/armv7.h>
@@ -299,7 +301,8 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)* DIFFERENCE: Instead of calling prep and go at the end * they are called if subcommand is equal 0. */ -int do_bootm_linux (int flag,int argc,char *argv[],bootm_headers_t *images) +int do_bootm_linux (int flag,int argc,char *const argv[], +bootm_headers_t *images) {/* No need for those on ARM */ if (flag &BOOTM_STATE_OS_BD_T || flag &BOOTM_STATE_OS_CMDLINE )
Signature · 1 line
1.9.1
PATCH 1/4 ARM: prevent compiler warnings from bootm.c
Hi Eric,
Quoted 28 lines · Eric Nelson
Without preceding declarations, "make C=1" generates "Should it be static?" warnings for symbols
do_bootm_linux,
boot_prep_vxworks, andboot_jump_vxworksInclude of
bootm.halso identified a signature mismatch (const on argv[]).Signed-off-by Eric Nelson <[email protected]>--- arch/arm/lib/bootm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)arch/arm/lib/bootm.c +2
-0@@ -22,6 +22,8 @@#include <asm/bootm.h> #include <asm/secure.h> #include <linux/compiler.h> +#include <bootm.h> +#include <vxworks.h> #if defined(CONFIG_ARMV7_NONSEC ) || defined(CONFIG_ARMV7_VIRT )#include <asm/armv7.h>
arch/arm/lib/bootm.c static void boot_jump_linux(bootm_headers_t *images, int flag) · line 308
Quoted 9 lines
arch/arm/lib/bootm.c +2
-1@@ -299,7 +301,8 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)* DIFFERENCE: Instead of calling prep and go at the end * they are called if subcommand is equal 0. */ -int do_bootm_linux (int flag,int argc,char *argv[],bootm_headers_t *images) +int do_bootm_linux (int flag,int argc,char *const argv[], +bootm_headers_t *images) {/* No need for those on ARM */ if (flag &BOOTM_STATE_OS_BD_T || flag &BOOTM_STATE_OS_CMDLINE )
Amicalement,
Signature · 1 line
Albert.
PATCH 1/4 ARM: prevent compiler warnings from bootm.c
In reply to Eric NelsonHi Eric,
On 01/10/2014 00:40, Eric Nelson wrote:
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 2/4 ARM: i.MX6: include prototype for get_board_rev()
In reply to Eric NelsonInclude <asm/bootm.h> to see the prototype for get_board_rev() and prevent warning "Should it be static?" with "make C=1".
--- arch/arm/cpu/armv7/mx6/soc.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/cpu/armv7/mx6/soc.c +1 -0
@@ -20,6 +20,7 @@#include <stdbool.h> #include <asm/arch/mxc_hdmi.h> #include <asm/arch/crm_regs.h> +#include <asm/bootm.h> enum ldo_reg {LDO_ARM ,
Signature · 1 line
1.9.1
PATCH 2/4 ARM: i.MX6: include prototype for get_board_rev()
Quoted 5 lines · Eric Nelson
Include <
asm/bootm.h> to see the prototype forget_board_rev()and prevent warning "Should it be static?" with "make C=1".Signed-off-by Eric Nelson <[email protected]>---
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 3/4 ARM: i.MX: provide declaration for board_spi_cs_gpio
In reply to Eric NelsonProvide a public declaration of the board_spi_cs_gpio() callback for i.MX SPI chip selects to prevent the warning "Should it be static?" when compiling with "make C=1".
--- arch/arm/include/asm/imx-common/spi.h | 17 +++++++++++++++++ board/boundary/nitrogen6x/nitrogen6x.c | 1 + board/compulab/cm_fx6/common.c | 1 + board/embest/mx6boards/mx6boards.c | 1 + board/freescale/mx6qsabreauto/mx6qsabreauto.c | 1 + board/freescale/mx6slevk/mx6slevk.c | 1 + board/gateworks/gw_ventana/gw_ventana.c | 1 + board/genesi/mx51_efikamx/efikamx.c | 1 + board/ttcontrol/vision2/vision2.c | 1 + drivers/spi/mxc_spi.c | 1 + 10 files changed, 26 insertions(+) create mode 100644 arch/arm/include/asm/imx-common/spi.h
arch/arm/include/asm/imx-common/spi.h new file +17 -0
@@ -0,0 +1,17 @@ +/* +* Copyright 2011 Freescale Semiconductor, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __MXC_SPI_H_ +#define __MXC_SPI_H_ + +/* +* Board-level chip-select callback +* Should return GPIO # to be used for chip-select +*/ + +int board_spi_cs_gpio (unsigned bus,unsigned cs); + +#endif
board/boundary/nitrogen6x/nitrogen6x.c +1 -0
@@ -18,6 +18,7 @@#include <asm/imx-common/iomux-v3.h> #include <asm/imx-common/mxc_i2c.h> #include <asm/imx-common/sata.h> +#include <asm/imx-common/spi.h> #include <asm/imx-common/boot_mode.h> #include <asm/imx-common/video.h> #include <mmc.h>
board/compulab/cm_fx6/common.c +1 -0
@@ -11,6 +11,7 @@#include <common.h> #include <asm/arch/sys_proto.h> #include <asm/gpio.h> +#include <asm/imx-common/spi.h> #include <fsl_esdhc.h> #include "common.h"
board/embest/mx6boards/mx6boards.c +1 -0
@@ -23,6 +23,7 @@#include <asm/imx-common/iomux-v3.h> #include <asm/imx-common/boot_mode.h> #include <asm/imx-common/mxc_i2c.h> +#include <asm/imx-common/spi.h> #include <asm/imx-common/video.h> #include <i2c.h> #include <mmc.h>
board/freescale/mx6qsabreauto/mx6qsabreauto.c +1 -0
@@ -17,6 +17,7 @@#include <asm/imx-common/iomux-v3.h> #include <asm/imx-common/mxc_i2c.h> #include <asm/imx-common/boot_mode.h> +#include <asm/imx-common/spi.h> #include <mmc.h> #include <fsl_esdhc.h> #include <miiphy.h>
board/freescale/mx6slevk/mx6slevk.c +1 -0
@@ -13,6 +13,7 @@#include <asm/arch/sys_proto.h> #include <asm/gpio.h> #include <asm/imx-common/iomux-v3.h> +#include <asm/imx-common/spi.h> #include <asm/io.h> #include <linux/sizes.h> #include <common.h>
board/gateworks/gw_ventana/gw_ventana.c +1 -0
@@ -20,6 +20,7 @@#include <asm/imx-common/mxc_i2c.h> #include <asm/imx-common/boot_mode.h> #include <asm/imx-common/sata.h> +#include <asm/imx-common/spi.h> #include <asm/imx-common/video.h> #include <jffs2/load_kernel.h> #include <hwconfig.h>
board/genesi/mx51_efikamx/efikamx.c +1 -0
@@ -14,6 +14,7 @@#include <asm/arch/sys_proto.h> #include <asm/arch/crm_regs.h> #include <asm/arch/clock.h> +#include <asm/imx-common/spi.h> #include <i2c.h> #include <mmc.h> #include <fsl_esdhc.h>
board/ttcontrol/vision2/vision2.c +1 -0
@@ -15,6 +15,7 @@#include <asm/arch/iomux-mx51.h> #include <asm/gpio.h> #include <asm/arch/sys_proto.h> +#include <asm/imx-common/spi.h> #include <i2c.h> #include <mmc.h> #include <power/pmic.h>
drivers/spi/mxc_spi.c +1 -0
@@ -12,6 +12,7 @@#include <asm/gpio.h> #include <asm/arch/imx-regs.h> #include <asm/arch/clock.h> +#include <asm/imx-common/spi.h> #ifdef CONFIG_MX27 /* i.MX27 has a completely wrong register layout and register definitions in the
Signature · 1 line
1.9.1
PATCH 3/4 ARM: i.MX: provide declaration for board_spi_cs_gpio
Quoted 6 lines · Eric Nelson
Provide a public declaration of the
board_spi_cs_gpio()callback for i.MX SPI chip selects to prevent the warning "Should it be static?" when compiling with "make C=1".Signed-off-by Eric Nelson <[email protected]>---
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 4/4 ARM: i.MX video: declare displays and display_count publicly
In reply to Eric NelsonDeclare displays[] and display_count in imx-common/video.h to prevent "Should it be static?" messages when compiling board files with "make C=1".
--- arch/arm/imx-common/video.c | 3 --- arch/arm/include/asm/imx-common/video.h | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-)
arch/arm/imx-common/video.c +0 -3
@@ -6,9 +6,6 @@#include <asm/errno.h> #include <asm/imx-common/video.h> -extern struct display_info_t const displays[]; -extern size_t display_count; -int board_video_skip (void ) {int i;
arch/arm/include/asm/imx-common/video.h +5 -0
@@ -21,4 +21,9 @@ struct display_info_t {extern int detect_hdmi (struct display_info_t const *dev);#endif +#ifdef CONFIG_IMX_VIDEO_SKIP +extern struct display_info_t const displays[]; +extern size_t display_count; +#endif +#endif
Signature · 1 line
1.9.1
PATCH 4/4 ARM: i.MX video: declare displays and display_count publicly
Quoted 6 lines · Eric Nelson
Declare displays[] and
display_countinimx-common/video.hto prevent "Should it be static?" messages when compiling board files with "make C=1".Signed-off-by Eric Nelson <[email protected]>---
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 1/1 stdio: staticize locally-used call-backs
In reply to Eric NelsonThe various nulldev_x and stdio_serial_x calls are only used indirectly through the nulldev and serial devices, so make them static and prevent the dreaded "Should it be static?" warning with "make C=1".
--- common/stdio.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
common/stdio.c +7 -7
@@ -36,39 +36,39 @@ char *stdio_names[MAX_FILES] = { "stdin", "stdout", "stderr" };#ifdef CONFIG_SYS_DEVICE_NULLDEV -void nulldev_putc (struct stdio_dev *dev,const char c) +static void nulldev_putc (struct stdio_dev *dev,const char c) {/* nulldev is empty! */ } -void nulldev_puts (struct stdio_dev *dev,const char *s) +static void nulldev_puts (struct stdio_dev *dev,const char *s) {/* nulldev is empty! */ } -int nulldev_input (struct stdio_dev *dev) +static int nulldev_input (struct stdio_dev *dev) {/* nulldev is empty! */ return 0 ; }#endif -void stdio_serial_putc (struct stdio_dev *dev,const char c) +static void stdio_serial_putc (struct stdio_dev *dev,const char c) {serial_putc (c); } -void stdio_serial_puts (struct stdio_dev *dev,const char *s) +static void stdio_serial_puts (struct stdio_dev *dev,const char *s) {serial_puts (s); } -int stdio_serial_getc (struct stdio_dev *dev) +static int stdio_serial_getc (struct stdio_dev *dev) {return serial_getc (); } -int stdio_serial_tstc (struct stdio_dev *dev) +static int stdio_serial_tstc (struct stdio_dev *dev) {return serial_tstc (); }
Signature · 1 line
1.9.1
[U-Boot] stdio: staticize locally-used call-backs
Quoted 5 lines · Eric Nelson
The various
nulldev_xandstdio_serial_xcalls are only used indirectly through the nulldev and serial devices, so make them static and prevent the dreaded "Should it be static?" warning with "make C=1".Signed-off-by Eric Nelson <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141027/c9cad55e/attachment.pgp>