Files
u-boot-tk1-som/include
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
..
2008-05-21 00:14:08 +02:00
2008-10-18 21:54:03 +02:00
2008-12-09 23:39:59 +01:00
2008-10-18 21:54:03 +02:00
2008-12-15 22:05:36 +01:00
2008-05-21 00:14:08 +02:00
2008-10-18 21:54:03 +02:00
2008-05-21 00:14:08 +02:00
2007-08-14 18:42:36 +02:00
2008-10-18 21:54:03 +02:00
2008-05-10 11:44:55 +02:00
2008-05-21 00:14:08 +02:00
2008-05-21 00:14:08 +02:00
2009-01-28 08:49:52 +01:00
2008-10-18 21:54:03 +02:00
2008-10-18 21:54:03 +02:00
2009-01-28 13:26:15 -05:00
2009-01-24 00:23:09 +01:00
2008-05-21 00:14:08 +02:00
2008-10-18 21:54:03 +02:00
2008-05-21 00:14:08 +02:00
2008-10-18 21:54:03 +02:00
2008-03-26 23:38:54 +01:00
2009-02-11 17:01:17 +01:00
2008-10-18 21:54:03 +02:00
2008-10-18 21:54:03 +02:00
2008-10-18 21:54:03 +02:00
2008-10-18 21:54:03 +02:00
2008-07-10 00:39:28 +02:00
2008-10-18 21:54:03 +02:00
2008-10-18 21:54:03 +02:00
2009-02-16 18:07:41 -06:00
2008-10-18 21:54:03 +02:00
2008-10-18 21:54:03 +02:00
2008-10-18 21:54:03 +02:00
2008-06-10 18:22:25 -05:00
2008-10-18 21:54:03 +02:00
2009-02-03 15:40:29 -07:00
2008-10-18 21:54:03 +02:00
2009-01-23 10:32:49 -06:00
2008-05-21 00:14:08 +02:00
2008-05-21 00:14:08 +02:00
2008-05-21 00:14:08 +02:00
2008-05-21 00:14:08 +02:00
2008-05-21 00:14:08 +02:00
2008-05-21 00:14:08 +02:00
2008-10-18 21:54:03 +02:00
2008-10-18 21:54:03 +02:00
2008-05-21 00:14:08 +02:00
2008-08-27 11:43:54 -05:00
2009-02-10 00:27:13 +01:00
2008-10-18 21:54:03 +02:00
2008-10-18 21:54:03 +02:00
2008-10-18 21:54:03 +02:00
2008-10-18 21:54:03 +02:00
2008-10-18 21:54:03 +02:00
2008-05-21 00:14:08 +02:00
2008-05-21 00:14:08 +02:00
2008-05-21 00:14:08 +02:00
2008-05-21 00:14:08 +02:00
2008-10-18 21:54:03 +02:00
2008-05-21 00:14:08 +02:00
2008-09-22 22:07:20 +02:00
2008-06-03 20:31:34 +02:00
2008-04-13 14:52:48 -07:00
2008-05-21 00:14:08 +02:00
2009-01-28 19:57:27 +01:00
2008-05-21 00:14:08 +02:00
2008-11-02 16:23:46 +01:00
2008-05-21 00:14:08 +02:00
2008-05-21 00:14:08 +02:00
2008-05-21 00:14:08 +02:00
2008-10-18 21:54:03 +02:00
2008-10-18 21:54:03 +02:00