Skip to content

Commit 1de5b08

Browse files
Matt FlemingThomas Gleixner
authored andcommitted
x86: HPET: convert WARN_ON to WARN_ON_ONCE
It is possible to flood the console with call traces if the WARN_ON condition is true because of the frequency with which this function is called. Signed-off-by: Matt Fleming <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Thomas Gleixner <[email protected]>
1 parent f7160c7 commit 1de5b08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kernel/hpet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ static int hpet_next_event(unsigned long delta,
322322
* what we wrote hit the chip before we compare it to the
323323
* counter.
324324
*/
325-
WARN_ON((u32)hpet_readl(HPET_T0_CMP) != cnt);
325+
WARN_ON_ONCE((u32)hpet_readl(HPET_T0_CMP) != cnt);
326326

327327
return (s32)((u32)hpet_readl(HPET_COUNTER) - cnt) >= 0 ? -ETIME : 0;
328328
}

0 commit comments

Comments
 (0)