Skip to content

Commit

Permalink
throttle: Make throttle_compute_timer() static
Browse files Browse the repository at this point in the history
This function is only used internally in throttle.c

Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
  • Loading branch information
bertogg authored and kevmw committed Feb 22, 2016
1 parent 9bd9c7f commit 3c9242f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
6 changes: 0 additions & 6 deletions include/qemu/throttle.h
Expand Up @@ -84,12 +84,6 @@ void throttle_leak_bucket(LeakyBucket *bkt, int64_t delta);

int64_t throttle_compute_wait(LeakyBucket *bkt);

/* expose timer computation function for unit tests */
bool throttle_compute_timer(ThrottleState *ts,
bool is_write,
int64_t now,
int64_t *next_timestamp);

/* init/destroy cycle */
void throttle_init(ThrottleState *ts);

Expand Down
8 changes: 4 additions & 4 deletions util/throttle.c
Expand Up @@ -137,10 +137,10 @@ static int64_t throttle_compute_wait_for(ThrottleState *ts,
* @next_timestamp: the resulting timer
* @ret: true if a timer must be set
*/
bool throttle_compute_timer(ThrottleState *ts,
bool is_write,
int64_t now,
int64_t *next_timestamp)
static bool throttle_compute_timer(ThrottleState *ts,
bool is_write,
int64_t now,
int64_t *next_timestamp)
{
int64_t wait;

Expand Down

0 comments on commit 3c9242f

Please sign in to comment.