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>
This commit is contained in:
parent
228f4df559
commit
ffc0b27db4
|
@ -26,7 +26,7 @@ struct udiv_result {
|
|||
};
|
||||
|
||||
/* Function prototypes */
|
||||
void udelay(int us);
|
||||
void udelay(uint32_t us);
|
||||
void *memchr(const void *void_s, int c, size_t n);
|
||||
void *memmove(void *s1, const void *s2, size_t n);
|
||||
int strcmp(const char *s1, const char *s2);
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
|
||||
#include <hv_lib.h>
|
||||
|
||||
void udelay(int loop_count)
|
||||
void udelay(uint32_t us)
|
||||
{
|
||||
uint64_t dest_tsc, delta_tsc;
|
||||
|
||||
/* Calculate number of ticks to wait */
|
||||
delta_tsc = US_TO_TICKS(loop_count);
|
||||
delta_tsc = US_TO_TICKS(us);
|
||||
dest_tsc = rdtsc() + delta_tsc;
|
||||
|
||||
/* Loop until time expired */
|
||||
|
|
Loading…
Reference in New Issue