Remove volatile qualifier in get_ram_size() calls
PATCH 1/1 Remove volatile qualifier in get_ram_size() calls
Checkpatch.pl complains about the volatile qualifier in calls to get_ram_size(). Remove this qualifier in the prototype and in the calls where it is useless, and leave it only in the function body where it is needed.
---
This change just prevents checkpatch from emitting spurious warnings; it does not affect the building process or results. It has been tested by comparing the build logs for jadecpu with and without the patch, using BUILD_NCPUS=1 to ensure both logs were ordered identically. The binaries were also compared (actually the .srec files) and found identical except for the version string.
arch/arm/cpu/arm926ejs/orion5x/dram.c | 4 ++-- board/BuS/eb_cpux9k2/cpux9k2.c | 2 +- board/atmel/at91rm9200ek/at91rm9200ek.c | 2 +- board/davedenx/qong/qong.c | 2 +- board/davinci/common/misc.c | 2 +- board/efikamx/efikamx.c | 2 +- board/eukrea/cpu9260/cpu9260.c | 2 +- board/eukrea/cpuat91/cpuat91.c | 2 +- board/freescale/mx31ads/mx31ads.c | 2 +- board/freescale/mx31pdk/mx31pdk.c | 2 +- board/freescale/mx51evk/mx51evk.c | 2 +- board/freescale/mx53ard/mx53ard.c | 4 ++-- board/freescale/mx53evk/mx53evk.c | 2 +- board/freescale/mx53loco/mx53loco.c | 4 ++-- board/freescale/mx53smd/mx53smd.c | 4 ++-- board/imx31_phycore/imx31_phycore.c | 2 +- board/karo/tx25/tx25.c | 6 +++--- board/keymile/km_arm/km_arm.c | 2 +- board/logicpd/imx27lite/imx27lite.c | 6 +++--- board/logicpd/imx31_litekit/imx31_litekit.c | 2 +- board/mx1ads/mx1ads.c | 2 +- board/ronetix/pm9261/pm9261.c | 2 +- board/ronetix/pm9263/pm9263.c | 2 +- board/ronetix/pm9g45/pm9g45.c | 2 +- board/syteco/jadecpu/jadecpu.c | 2 +- common/memsize.c | 2 +- include/common.h | 2 +- 27 files changed, 35 insertions(+), 35 deletions(-)
arch/arm/cpu/arm926ejs/orion5x/dram.c +2 -2
@@ -53,7 +53,7 @@ int dram_init (void) {/* dram_init must store complete ramsize in gd->ram_size */ gd->ram_size =get_ram_size ( - (volatile long *)orion5x_sdram_bar (0 ), + (long *)orion5x_sdram_bar (0 ),CONFIG_MAX_RAM_BANK_SIZE );return 0 ; }
@@ -65,7 +65,7 @@ void dram_init_banksize (void)for (i =0 ; i <CONFIG_NR_DRAM_BANKS ; i++) { gd->bd->bi_dram[i].start =orion5x_sdram_bar (i); gd->bd->bi_dram[i].size =get_ram_size ( - (volatile long *) (gd->bd->bi_dram[i].start), + (long *) (gd->bd->bi_dram[i].start),CONFIG_MAX_RAM_BANK_SIZE ); } }
board/BuS/eb_cpux9k2/cpux9k2.c +1 -1
@@ -141,7 +141,7 @@ void reset_phy(void)int dram_init (void ) { - gd->ram_size =get_ram_size ((volatile long *)CONFIG_SYS_SDRAM_BASE , + gd->ram_size =get_ram_size ((long *)CONFIG_SYS_SDRAM_BASE ,CONFIG_SYS_SDRAM_SIZE );return 0 ; }
board/atmel/at91rm9200ek/at91rm9200ek.c +1 -1
@@ -64,7 +64,7 @@ int board_early_init_f(void)int dram_init (void ) {/* dram_init must store complete ramsize in gd->ram_size */ - gd->ram_size =get_ram_size ((volatile long *)CONFIG_SYS_SDRAM_BASE , + gd->ram_size =get_ram_size ((long *)CONFIG_SYS_SDRAM_BASE ,CONFIG_SYS_SDRAM_SIZE );return 0 ; }
board/davedenx/qong/qong.c +1 -1
@@ -44,7 +44,7 @@ void hw_watchdog_reset(void)int dram_init (void ) {/* dram_init must store complete ramsize in gd->ram_size */ - gd->ram_size =get_ram_size ((volatile void *)CONFIG_SYS_SDRAM_BASE , + gd->ram_size =get_ram_size ((void *)CONFIG_SYS_SDRAM_BASE ,PHYS_SDRAM_1_SIZE );return 0 ; }
board/davinci/common/misc.c +1 -1
@@ -38,7 +38,7 @@ int dram_init(void) {/* dram_init must store complete ramsize in gd->ram_size */ gd->ram_size =get_ram_size ( - (volatile void *)CONFIG_SYS_SDRAM_BASE , + (void *)CONFIG_SYS_SDRAM_BASE ,CONFIG_MAX_RAM_BANK_SIZE );return 0 ; }
board/efikamx/efikamx.c +1 -1
@@ -113,7 +113,7 @@ u32 get_board_rev(void)int dram_init (void ) {/* dram_init must store complete ramsize in gd->ram_size */ - gd->ram_size =get_ram_size ((volatile void *)CONFIG_SYS_SDRAM_BASE , + gd->ram_size =get_ram_size ((void *)CONFIG_SYS_SDRAM_BASE ,PHYS_SDRAM_1_SIZE );return 0 ; }
board/eukrea/cpu9260/cpu9260.c +1 -1
@@ -174,7 +174,7 @@ int board_init(void)int dram_init (void ) { - gd->ram_size =get_ram_size ((volatile long *)CONFIG_SYS_SDRAM_BASE , + gd->ram_size =get_ram_size ((long *)CONFIG_SYS_SDRAM_BASE ,CONFIG_SYS_SDRAM_SIZE );return 0 ; }
board/eukrea/cpuat91/cpuat91.c +1 -1
@@ -63,7 +63,7 @@ int board_early_init_f(void)int dram_init (void ) {/* dram_init must store complete ramsize in gd->ram_size */ - gd->ram_size =get_ram_size ((volatile long *)CONFIG_SYS_SDRAM_BASE , + gd->ram_size =get_ram_size ((long *)CONFIG_SYS_SDRAM_BASE ,CONFIG_SYS_SDRAM_SIZE );return 0 ; }
board/freescale/mx31ads/mx31ads.c +1 -1
@@ -31,7 +31,7 @@ DECLARE_GLOBAL_DATA_PTR;int dram_init (void ) {/* dram_init must store complete ramsize in gd->ram_size */ - gd->ram_size =get_ram_size ((volatile void *)PHYS_SDRAM_1 , + gd->ram_size =get_ram_size ((void *)PHYS_SDRAM_1 ,PHYS_SDRAM_1_SIZE );return 0 ; }
board/freescale/mx31pdk/mx31pdk.c +1 -1
@@ -42,7 +42,7 @@ void hw_watchdog_reset(void)int dram_init (void ) {/* dram_init must store complete ramsize in gd->ram_size */ - gd->ram_size =get_ram_size ((volatile void *)CONFIG_SYS_SDRAM_BASE , + gd->ram_size =get_ram_size ((void *)CONFIG_SYS_SDRAM_BASE ,PHYS_SDRAM_1_SIZE );return 0 ; }
board/freescale/mx51evk/mx51evk.c +1 -1
@@ -53,7 +53,7 @@ u32 get_board_rev(void)int dram_init (void ) {/* dram_init must store complete ramsize in gd->ram_size */ - gd->ram_size =get_ram_size ((volatile void *)CONFIG_SYS_SDRAM_BASE , + gd->ram_size =get_ram_size ((void *)CONFIG_SYS_SDRAM_BASE ,PHYS_SDRAM_1_SIZE );return 0 ; }
board/freescale/mx53ard/mx53ard.c +2 -2
@@ -46,8 +46,8 @@ int dram_init(void) {u32 size1, size2; - size1 =get_ram_size ((volatile void *)PHYS_SDRAM_1 ,PHYS_SDRAM_1_SIZE ); - size2 =get_ram_size ((volatile void *)PHYS_SDRAM_2 ,PHYS_SDRAM_2_SIZE ); + size1 =get_ram_size ((void *)PHYS_SDRAM_1 ,PHYS_SDRAM_1_SIZE ); + size2 =get_ram_size ((void *)PHYS_SDRAM_2 ,PHYS_SDRAM_2_SIZE ); gd->ram_size = size1 + size2;
board/freescale/mx53evk/mx53evk.c +1 -1
@@ -46,7 +46,7 @@ u32 get_board_rev(void)int dram_init (void ) {/* dram_init must store complete ramsize in gd->ram_size */ - gd->ram_size =get_ram_size ((volatile void *)CONFIG_SYS_SDRAM_BASE , + gd->ram_size =get_ram_size ((void *)CONFIG_SYS_SDRAM_BASE ,PHYS_SDRAM_1_SIZE );return 0 ; }
board/freescale/mx53loco/mx53loco.c +2 -2
@@ -47,8 +47,8 @@ int dram_init(void) {u32 size1, size2; - size1 =get_ram_size ((volatile void *)PHYS_SDRAM_1 ,PHYS_SDRAM_1_SIZE ); - size2 =get_ram_size ((volatile void *)PHYS_SDRAM_2 ,PHYS_SDRAM_2_SIZE ); + size1 =get_ram_size ((void *)PHYS_SDRAM_1 ,PHYS_SDRAM_1_SIZE ); + size2 =get_ram_size ((void *)PHYS_SDRAM_2 ,PHYS_SDRAM_2_SIZE ); gd->ram_size = size1 + size2;
board/freescale/mx53smd/mx53smd.c +2 -2
@@ -44,8 +44,8 @@ int dram_init(void) {u32 size1, size2; - size1 =get_ram_size ((volatile void *)PHYS_SDRAM_1 ,PHYS_SDRAM_1_SIZE ); - size2 =get_ram_size ((volatile void *)PHYS_SDRAM_2 ,PHYS_SDRAM_2_SIZE ); + size1 =get_ram_size ((void *)PHYS_SDRAM_1 ,PHYS_SDRAM_1_SIZE ); + size2 =get_ram_size ((void *)PHYS_SDRAM_2 ,PHYS_SDRAM_2_SIZE ); gd->ram_size = size1 + size2;
board/imx31_phycore/imx31_phycore.c +1 -1
@@ -33,7 +33,7 @@ DECLARE_GLOBAL_DATA_PTR;int dram_init (void ) {/* dram_init must store complete ramsize in gd->ram_size */ - gd->ram_size =get_ram_size ((volatile void *)PHYS_SDRAM_1 , + gd->ram_size =get_ram_size ((void *)PHYS_SDRAM_1 ,PHYS_SDRAM_1_SIZE );return 0 ; }
board/karo/tx25/tx25.c +3 -3
@@ -160,7 +160,7 @@ int board_late_init(void)int dram_init (void ) {/* dram_init must store complete ramsize in gd->ram_size */ - gd->ram_size =get_ram_size ((volatile void *)PHYS_SDRAM_1 , + gd->ram_size =get_ram_size ((void *)PHYS_SDRAM_1 ,PHYS_SDRAM_1_SIZE );return 0 ; }
@@ -168,11 +168,11 @@ int dram_init (void)void dram_init_banksize (void ) { gd->bd->bi_dram[0 ].start =PHYS_SDRAM_1 ; - gd->bd->bi_dram[0 ].size =get_ram_size ((volatile void *)PHYS_SDRAM_1 , + gd->bd->bi_dram[0 ].size =get_ram_size ((void *)PHYS_SDRAM_1 ,PHYS_SDRAM_1_SIZE );#if CONFIG_NR_DRAM_BANKS >1 gd->bd->bi_dram[1 ].start =PHYS_SDRAM_2 ; - gd->bd->bi_dram[1 ].size =get_ram_size ((volatile void *)PHYS_SDRAM_2 , + gd->bd->bi_dram[1 ].size =get_ram_size ((void *)PHYS_SDRAM_2 ,PHYS_SDRAM_2_SIZE );#else
board/keymile/km_arm/km_arm.c +1 -1
@@ -321,7 +321,7 @@ int dram_init(void) {/* dram_init must store complete ramsize in gd->ram_size */ /* Fix this */ - gd->ram_size =get_ram_size ((volatile void *)kw_sdram_bar (0 ), + gd->ram_size =get_ram_size ((void *)kw_sdram_bar (0 ),kw_sdram_bs (0 ));return 0 ; }
board/logicpd/imx27lite/imx27lite.c +3 -3
@@ -67,7 +67,7 @@ int board_init (void)int dram_init (void ) {/* dram_init must store complete ramsize in gd->ram_size */ - gd->ram_size =get_ram_size ((volatile void *)CONFIG_SYS_SDRAM_BASE , + gd->ram_size =get_ram_size ((void *)CONFIG_SYS_SDRAM_BASE ,PHYS_SDRAM_1_SIZE );return 0 ; }
@@ -75,11 +75,11 @@ int dram_init (void)void dram_init_banksize (void ) { gd->bd->bi_dram[0 ].start =CONFIG_SYS_SDRAM_BASE ; - gd->bd->bi_dram[0 ].size =get_ram_size ((volatile void *)CONFIG_SYS_SDRAM_BASE , + gd->bd->bi_dram[0 ].size =get_ram_size ((void *)CONFIG_SYS_SDRAM_BASE ,PHYS_SDRAM_1_SIZE );#if CONFIG_NR_DRAM_BANKS >1 gd->bd->bi_dram[1 ].start =PHYS_SDRAM_2 ; - gd->bd->bi_dram[1 ].size =get_ram_size ((volatile void *)PHYS_SDRAM_2 , + gd->bd->bi_dram[1 ].size =get_ram_size ((void *)PHYS_SDRAM_2 ,PHYS_SDRAM_2_SIZE );#endif }
board/logicpd/imx31_litekit/imx31_litekit.c +1 -1
@@ -32,7 +32,7 @@ DECLARE_GLOBAL_DATA_PTR;int dram_init (void ) {/* dram_init must store complete ramsize in gd->ram_size */ - gd->ram_size =get_ram_size ((volatile void *)PHYS_SDRAM_1 , + gd->ram_size =get_ram_size ((void *)PHYS_SDRAM_1 ,PHYS_SDRAM_1_SIZE );return 0 ; }
board/mx1ads/mx1ads.c +1 -1
@@ -169,7 +169,7 @@ int board_late_init (void)int dram_init (void ) {/* dram_init must store complete ramsize in gd->ram_size */ - gd->ram_size =get_ram_size ((volatile void *)PHYS_SDRAM_1 , + gd->ram_size =get_ram_size ((void *)PHYS_SDRAM_1 ,PHYS_SDRAM_1_SIZE );return 0 ; }
board/ronetix/pm9261/pm9261.c +1 -1
@@ -282,7 +282,7 @@ int board_eth_init(bd_t *bis)int dram_init (void ) {/* dram_init must store complete ramsize in gd->ram_size */ - gd->ram_size =get_ram_size ((volatile void *)PHYS_SDRAM , + gd->ram_size =get_ram_size ((void *)PHYS_SDRAM ,PHYS_SDRAM_SIZE );return 0 ; }
board/ronetix/pm9263/pm9263.c +1 -1
@@ -379,7 +379,7 @@ int board_init(void)int dram_init (void ) {/* dram_init must store complete ramsize in gd->ram_size */ - gd->ram_size =get_ram_size ((volatile void *)PHYS_SDRAM , + gd->ram_size =get_ram_size ((void *)PHYS_SDRAM ,PHYS_SDRAM_SIZE );return 0 ; }
board/ronetix/pm9g45/pm9g45.c +1 -1
@@ -160,7 +160,7 @@ int board_init(void)int dram_init (void ) {/* dram_init must store complete ramsize in gd->ram_size */ - gd->ram_size =get_ram_size ((volatile void *)PHYS_SDRAM , + gd->ram_size =get_ram_size ((void *)PHYS_SDRAM ,PHYS_SDRAM_SIZE );return 0 ; }
board/syteco/jadecpu/jadecpu.c +1 -1
@@ -152,7 +152,7 @@ int misc_init_r(void)int dram_init (void ) {/* dram_init must store complete ramsize in gd->ram_size */ - gd->ram_size =get_ram_size ((volatile void *)PHYS_SDRAM , + gd->ram_size =get_ram_size ((void *)PHYS_SDRAM ,PHYS_SDRAM_SIZE );return 0 ;
common/memsize.c +1 -1
@@ -37,7 +37,7 @@* the actually available RAM size between addresses `base' and * `base + maxsize'. */ -long get_ram_size (volatile long *base,long maxsize) +long get_ram_size (long *base,long maxsize) {volatile long *addr;long save[32 ];
include/common.h +1 -1
@@ -317,7 +317,7 @@ const char *symbol_lookup(unsigned long addr, unsigned long *caddr);void api_init (void );/* common/memsize.c */ -long get_ram_size (volatile long *,long ); +long get_ram_size (long *,long );/* $(BOARD)/$(BOARD).c */ void reset_phy (void );
Signature · 1 line
1.7.4.1
PATCH 1/1 Remove volatile qualifier in get_ram_size() calls
Hi Wolfgang,
Le 03/07/2011 17:55, Albert ARIBAUD a ?crit :
Quoted 5 lines
Checkpatch.pl complains about the volatile qualifier in calls to
get_ram_size(). Remove this qualifier in the prototype and in the calls where it is useless, and leave it only in the function body where it is needed.
Quoted 8 lines
Signed-off-by Albert ARIBAUD<[email protected]>---
This change just prevents checkpatch from emitting spurious warnings; it does not affect the building process or results. It has been tested by comparing the build logs for jadecpu with and without the patch, using BUILD_NCPUS=1 to ensure both logs were ordered identically. The binaries were also compared (actually the .srec files) and found identical except for the version string.
There seems to be no comments or dissents for this patch. Can it get in? I can pull it into u-boot-arm, but as it is a codebase-global change I would prefer it to go into u-boot so that all repositories can be rebased on it and any issues or incompatibilities can be uncovered as early as possible.
Amicalement,
Signature · 1 line
Albert.
PATCH 1/1 Remove volatile qualifier in get_ram_size() calls
In reply to Albert ARIBAUDLe 03/07/2011 17:55, Albert ARIBAUD a ?crit :
Quoted 7 lines
Checkpatch.pl complains about the volatile qualifier in calls to
get_ram_size(). Remove this qualifier in the prototype and in the calls where it is useless, and leave it only in the function body where it is needed.Signed-off-by Albert ARIBAUD<[email protected]>---
Applied to u-boot-arm/master.
Amicalement,
Signature · 1 line
Albert.