sim: Only print the power state transition warning once

A lot of objects seem to request no-op power transitions which
currently results in large amounts of warnings. These warnings are
benign and risk hiding more serious warnings. Make the warning a
warn_once to prevent console flooding.

Change-Id: I86c74b4224b167f14469250ef86ab69fde7a227e
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
This commit is contained in:
Andreas Sandberg 2016-06-06 17:16:44 +01:00
parent 12714040a2
commit 21b66f4542

View file

@ -78,8 +78,8 @@ ClockedObject::pwrState(Enums::PwrState p)
{
// Function should ideally be called only when there is a state change
if (_currPwrState == p) {
warn("ClockedObject: Already in the requested power state, request "\
"ignored");
warn_once("ClockedObject: Already in the requested power state, " \
"request ignored");
return;
}