job_event_* functions can all be static, as they are not used outside job.c.
Signed-off-by: Emanuele Giuseppe Esposito <eespo...@redhat.com> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> --- include/qemu/job.h | 6 ------ job.c | 12 ++++++++++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/qemu/job.h b/include/qemu/job.h index f800b0b881..c95f9fa8d1 100644 --- a/include/qemu/job.h +++ b/include/qemu/job.h @@ -454,12 +454,6 @@ void job_progress_set_remaining(Job *job, uint64_t remaining); */ void job_progress_increase_remaining(Job *job, uint64_t delta); -/** To be called when a cancelled job is finalised. */ -void job_event_cancelled(Job *job); - -/** To be called when a successfully completed job is finalised. */ -void job_event_completed(Job *job); - /** * Conditionally enter the job coroutine if the job is ready to run, not * already busy and fn() returns true. fn() is called while under the job_lock diff --git a/job.c b/job.c index f4e1a56705..b0dba40728 100644 --- a/job.c +++ b/job.c @@ -498,12 +498,20 @@ void job_progress_increase_remaining(Job *job, uint64_t delta) progress_increase_remaining(&job->progress, delta); } -void job_event_cancelled(Job *job) +/** + * To be called when a cancelled job is finalised. + * Called with job_mutex held. + */ +static void job_event_cancelled(Job *job) { notifier_list_notify(&job->on_finalize_cancelled, job); } -void job_event_completed(Job *job) +/** + * To be called when a successfully completed job is finalised. + * Called with job_mutex held. + */ +static void job_event_completed(Job *job) { notifier_list_notify(&job->on_finalize_completed, job); } -- 2.31.1