northbridge/amd/{gx2,lx}: Qualify pointer with `volatile`
There is no guarantee reading a dereferenced null pointer will not be optimised away. Qualify the integer storage type with volatile. Clang enforces this explicitness. Change-Id: I31524141d70632cade0490c820936a3a8b570346 Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/6148 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
parent
38a8fb0c18
commit
df3629b63c
|
@ -660,7 +660,7 @@ void northbridge_init_early(void)
|
|||
|
||||
/* Now that the descriptor to memory is set up. */
|
||||
/* The memory controller needs one read to synch its lines before it can be used. */
|
||||
i = *(int *) 0;
|
||||
i = *(volatile int *) 0;
|
||||
|
||||
GeodeLinkPriority();
|
||||
|
||||
|
|
|
@ -742,7 +742,7 @@ void northbridge_init_early(void)
|
|||
|
||||
/* Now that the descriptor to memory is set up. */
|
||||
/* The memory controller needs one read to synch its lines before it can be used. */
|
||||
i = *(int *)0;
|
||||
i = *(volatile int *)0;
|
||||
|
||||
GeodeLinkPriority();
|
||||
|
||||
|
|
Loading…
Reference in New Issue