acrn-hypervisor/hypervisor/lib/mdelay.c
Huihuang Shi 5189bcd272 HV:treewide:fix "Attempt to change parameter passed by value"
In the function scope,the parameter should not be
changed as Misra required.
V1->V2 recover some violations because of ldra's false positive.
V2->V3 sync local variable' type to parameter's type with the prefix of const.

Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-07-26 09:35:52 +08:00

19 lines
325 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_arg)
{
uint32_t loop_count = loop_count_arg;
/* Loop until done */
while (loop_count != 0U) {
/* Delay for 1 ms */
udelay(1000U);
loop_count--;
}
}