[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 03/20] job.c: API functions not used outside should be sta
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v5 03/20] job.c: API functions not used outside should be static |
Date: |
Thu, 10 Feb 2022 15:43:04 +0000 |
On Tue, Feb 08, 2022 at 09:34:56AM -0500, Emanuele Giuseppe Esposito wrote:
> job_event_* functions can all be static, as they are not used
> outside job.c.
>
> Same applies for job_txn_add_job().
>
> Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
> ---
> include/qemu/job.h | 18 ------------------
> job.c | 12 +++++++++---
> 2 files changed, 9 insertions(+), 21 deletions(-)
>
> diff --git a/include/qemu/job.h b/include/qemu/job.h
> index 86ec46c09e..6000463126 100644
> --- a/include/qemu/job.h
> +++ b/include/qemu/job.h
> @@ -356,18 +356,6 @@ JobTxn *job_txn_new(void);
> */
> void job_txn_unref(JobTxn *txn);
>
> -/**
> - * @txn: The transaction (may be NULL)
> - * @job: Job to add to the transaction
> - *
> - * Add @job to the transaction. The @job must not already be in a
> transaction.
> - * The caller must call either job_txn_unref() or job_completed() to release
> - * the reference that is automatically grabbed here.
> - *
> - * If @txn is NULL, the function does nothing.
> - */
> -void job_txn_add_job(JobTxn *txn, Job *job);
...
> diff --git a/job.c b/job.c
> index d603f9ad1e..f13939d3c6 100644
> --- a/job.c
> +++ b/job.c
> @@ -125,7 +125,7 @@ void job_txn_unref(JobTxn *txn)
> }
> }
>
> -void job_txn_add_job(JobTxn *txn, Job *job)
> +static void job_txn_add_job(JobTxn *txn, Job *job)
Please move the doc comments into the .c file too.
signature.asc
Description: PGP signature
- Re: [PATCH v5 02/20] job.h: categorize fields in struct Job, (continued)
- [PATCH v5 04/20] job.c: move inner aiocontext lock in callbacks, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 07/20] job.h: add _locked duplicates for job API functions called with and without job_mutex, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 17/20] job: detect change of aiocontext within job coroutine, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 03/20] job.c: API functions not used outside should be static, Emanuele Giuseppe Esposito, 2022/02/08
- Re: [PATCH v5 03/20] job.c: API functions not used outside should be static,
Stefan Hajnoczi <=
- [PATCH v5 14/20] block_job: rename block_job functions called with job_mutex held, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 09/20] jobs: add job lock in find_* functions, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 10/20] jobs: use job locks also in the unit tests, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 16/20] commit and mirror: create new nodes using bdrv_get_aio_context, and not the job aiocontext, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 13/20] job.h: rename job API functions called with job_mutex held, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 05/20] aio-wait.h: introduce AIO_WAIT_WHILE_UNLOCKED, Emanuele Giuseppe Esposito, 2022/02/08
- [PATCH v5 08/20] jobs: protect jobs with job_lock/unlock, Emanuele Giuseppe Esposito, 2022/02/08