public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] RFC: getramsize() prototype and volatile qualifier
@ 2011-04-21  7:09 Albert ARIBAUD
  2011-04-21 17:02 ` Mike Frysinger
  0 siblings, 1 reply; 5+ messages in thread
From: Albert ARIBAUD @ 2011-04-21  7:09 UTC (permalink / raw)
  To: u-boot

Hi all,

Call it a detail, but I see that get_ram_size() calls sometime qualify 
their argument as volatile and sometimes not, and this makes checkpatch 
complain that volatiles are Bad(tm), which I would like to get fixed.

The prototype for get_ram_size() in is

	long	get_ram_size  (volatile long *, long);

While I understand that the way get_ram_size() works, it needs to 
perform volatile *accesses* to addresses computed from its arguments, I 
don't see why it requires one of the arguments themselves to be volatile.

Am I missing something here, particularly about some toolchain requiring 
the argument to be volatile? I see no reason it should, but better safe 
than sorry.

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-04-22  5:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-21  7:09 [U-Boot] RFC: getramsize() prototype and volatile qualifier Albert ARIBAUD
2011-04-21 17:02 ` Mike Frysinger
2011-04-21 17:50   ` Albert ARIBAUD
2011-04-21 22:28     ` Mike Frysinger
2011-04-22  5:52       ` Albert ARIBAUD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox