u-boot/include/asm-mips
Shinya Kuribayashi 14209ac13f MIPS: Fix GCC-4.2 'discards qualifiers from pointer target type' warnings
Compiling dbau1x00 and gth2 boards with GCC-4.2, you would see new warnings
like this:

skuribay@ubuntu:u-boot.git$ ./MAKEALL dbau1000
Configuring for dbau1x00 board...
au1x00_eth.c: In function 'au1x00_send':
au1x00_eth.c:158: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type
au1x00_eth.c: In function 'au1x00_recv':
au1x00_eth.c:211: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type
au1x00_eth.c: In function 'au1x00_init':
au1x00_eth.c:252: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type
au1x00_eth.c: In function 'au1x00_recv':
au1x00_eth.c:211: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type
au1x00_eth.c: In function 'au1x00_init':
au1x00_eth.c:252: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type
au1x00_eth.c: In function 'au1x00_send':
au1x00_eth.c:158: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type

We're passing a volatile pointer to a function which is expecting a non-
volatile pointer.  That's potentially dangerous, so gcc warns about it.
Confirmed with ELDK 4.2 (GCC 4.2.2) and Sourcey G++ 4.2 (GCC 4.2.3).

To fix this, we add a volatile attribute to the argument in question.
The virt_to_phys function in Linux kernel also does the same thing.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
2009-02-22 21:15:43 +01:00
..
addrspace.h [MIPS] Rename Alchemy processor configs into CONFIG_SOC_* 2008-06-07 20:51:56 +09:00
asm.h [MIPS] cpu/mips/cache.S: Introduce NESTED/LEAF/END macros 2008-03-25 21:30:06 +09:00
au1x00.h [MIPS] Rename Alchemy processor configs into CONFIG_SOC_* 2008-06-07 20:51:56 +09:00
bitops.h * Code cleanup: 2003-06-27 21:31:46 +00:00
byteorder.h [MIPS] asm headers' updates 2008-03-25 11:43:17 +09:00
cachectl.h [MIPS] asm headers' updates 2008-03-25 11:43:17 +09:00
cacheops.h Big white-space cleanup. 2008-05-21 00:14:08 +02:00
config.h Add an architecture specific config.h for common defines 2009-02-10 00:43:54 +01:00
errno.h mips: Add an 'include/asm/errno.h', like all other architectures 2008-05-30 00:53:38 +09:00
global_data.h rename CFG_ macros to CONFIG_SYS 2008-10-18 21:54:03 +02:00
inca-ip.h * Code cleanup: 2003-06-27 21:31:46 +00:00
io.h MIPS: Fix GCC-4.2 'discards qualifiers from pointer target type' warnings 2009-02-22 21:15:43 +01:00
isadep.h [MIPS] asm headers' updates 2008-03-25 11:43:17 +09:00
mipsregs.h [MIPS] <asm/mipsregs.h>: Update coprocessor register access macros 2008-05-30 00:53:38 +09:00
posix_types.h * Code cleanup: 2003-06-27 21:31:46 +00:00
processor.h [MIPS] asm headers' updates 2008-03-25 11:43:17 +09:00
ptrace.h [MIPS] asm headers' updates 2008-03-25 11:43:17 +09:00
reboot.h [MIPS] Introduce _machine_restart 2008-03-25 21:30:07 +09:00
reg.h [MIPS] asm headers' updates 2008-03-25 11:43:17 +09:00
regdef.h [MIPS] asm headers' updates 2008-03-25 11:43:17 +09:00
sgidefs.h * Add support for 16 MB flash configuration of TRAB board 2003-02-28 00:49:47 +00:00
string.h Mips: Fix string functions differ prototype declaration 2007-10-24 00:29:31 +02:00
system.h * Code cleanup: 2003-06-27 21:31:46 +00:00
types.h Introduce phys_size_t and move phys_addr_t into asm/types.h 2008-04-13 17:13:46 -07:00
u-boot.h Change bd/gd memsize/ram_size to be phys_size_t. 2008-06-12 00:54:53 +02:00