acrn-hypervisor/hypervisor/lib/mdelay.c
Yang, Yu-chu dd695f3cfa HV: Moving operators out from conditions
To follow the Misra-c standard, any operators should be done outside
the conditions. Removed the prefix, postfix and bitwise shift from
conditions.

Signed-off-by: Yang, Yu-chu <yu-chu.yang@intel.com>
2018-07-09 13:10:34 +08:00

18 lines
280 B
C

/*
* Copyright (C) 2018 Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <hv_lib.h>
void mdelay(uint32_t loop_count)
{
/* Loop until done */
while (loop_count != 0) {
/* Delay for 1 ms */
udelay(1000);
loop_count--;
}
}