Skip to content

Commit ffc0b27

Browse files
junjiemao1lijinxia
authored andcommitted
HV: lib: make the argument to udelay unsigned
The parameter to udelay is the microseconds to wait for, which should be an unsigned integer. Signed-off-by: Junjie Mao <junjie.mao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
1 parent 228f4df commit ffc0b27

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

hypervisor/include/lib/rtl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ struct udiv_result {
2626
};
2727

2828
/* Function prototypes */
29-
void udelay(int us);
29+
void udelay(uint32_t us);
3030
void *memchr(const void *void_s, int c, size_t n);
3131
void *memmove(void *s1, const void *s2, size_t n);
3232
int strcmp(const char *s1, const char *s2);

hypervisor/lib/udelay.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
#include <hv_lib.h>
88

9-
void udelay(int loop_count)
9+
void udelay(uint32_t us)
1010
{
1111
uint64_t dest_tsc, delta_tsc;
1212

1313
/* Calculate number of ticks to wait */
14-
delta_tsc = US_TO_TICKS(loop_count);
14+
delta_tsc = US_TO_TICKS(us);
1515
dest_tsc = rdtsc() + delta_tsc;
1616

1717
/* Loop until time expired */

0 commit comments

Comments
 (0)