[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 01/11] blockjob: remove unnecessary check
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 01/11] blockjob: remove unnecessary check |
Date: |
Wed, 19 Apr 2017 10:48:26 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 |
On 04/19/2017 09:42 AM, Paolo Bonzini wrote:
> !job is always checked prior to the call, drop it from here.
>
> Reviewed-by: Stefan Hajnoczi <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> blockjob.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/blockjob.c b/blockjob.c
> index 6e48932..23022b3 100644
> --- a/blockjob.c
> +++ b/blockjob.c
> @@ -480,7 +480,7 @@ static bool block_job_should_pause(BlockJob *job)
>
> bool block_job_user_paused(BlockJob *job)
> {
Is it worth using some form of attribute((nonnull)) annotations on
various functions, to both state our intentions and let compilers help
us catch obvious places where we are violating our intentions? That's
more of a generic question to all of qemu, and doesn't affect your
particular patch, other than your patch is an instance where the
annotation would be useful if we wanted to use them.
> - return job ? job->user_paused : 0;
> + return job->user_paused;
> }
>
> void coroutine_fn block_job_pause_point(BlockJob *job)
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH for 2.10 00/11] Preparation for block job mutex, Paolo Bonzini, 2017/04/19
- [Qemu-devel] [PATCH 03/11] blockjob: introduce block_job_early_fail, Paolo Bonzini, 2017/04/19
- [Qemu-devel] [PATCH 04/11] blockjob: introduce block_job_pause/resume_all, Paolo Bonzini, 2017/04/19
- [Qemu-devel] [PATCH 08/11] blockjob: group BlockJob transaction functions together, Paolo Bonzini, 2017/04/19
- [Qemu-devel] [PATCH 09/11] blockjob: strengthen a bit test-blockjob-txn, Paolo Bonzini, 2017/04/19
- [Qemu-devel] [PATCH 07/11] blockjob: introduce block_job_cancel_async, check iostatus invariants, Paolo Bonzini, 2017/04/19