From patchwork Mon Jan 8 16:37:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 1883788 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=SoCgnFHk; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T809j26v4z1yPX for ; Tue, 9 Jan 2024 03:38:17 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMsdS-0005U2-9Q; Mon, 08 Jan 2024 11:37:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rMsdL-0005Pd-HW for qemu-ppc@nongnu.org; Mon, 08 Jan 2024 11:37:52 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rMsdI-0002pu-US for qemu-ppc@nongnu.org; Mon, 08 Jan 2024 11:37:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704731867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8JyAVituzHKzz/zXpAv4OyXDfgV7BDAfn1K6NqR7fpw=; b=SoCgnFHkdt2bGSZhVpbxugzlii7A0UlDJhcSuPqp7weTQdlZ/zMYbxdxit+NTmaa0f3ha9 EE8oY5737PSF76e3m0jKjlwCFbNCNDgYRq7ojodaagIi35bH5mWqb162VKXnxVTK9AdeFr IxJYtXTSIGCpJFhfGdse21xe3VnBmCg= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-668-xwrQBWUfPzqlTw3k0NIoCA-1; Mon, 08 Jan 2024 11:37:43 -0500 X-MC-Unique: xwrQBWUfPzqlTw3k0NIoCA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 514A83C025AC; Mon, 8 Jan 2024 16:37:41 +0000 (UTC) Received: from localhost (unknown [10.39.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 14E8B2026F95; Mon, 8 Jan 2024 16:37:40 +0000 (UTC) From: Stefan Hajnoczi To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Aleksandar Rikalo , qemu-block@nongnu.org, Alistair Francis , Max Filippov , kvm@vger.kernel.org, Daniel Henrique Barboza , Jiaxun Yang , qemu-arm@nongnu.org, Jean-Christophe Dubois , Jiri Slaby , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eric Blake , Paul Durrant , BALATON Zoltan , Kevin Wolf , Pavel Dovgalyuk , =?utf-8?q?Daniel_P=2E_Berrang?= =?utf-8?q?=C3=A9?= , Roman Bolshakov , Reinoud Zandijk , Christian Borntraeger , Gerd Hoffmann , Thomas Huth , Mark Cave-Ayland , xen-devel@lists.xenproject.org, Anthony Perard , Weiwei Li , qemu-ppc@nongnu.org, Sunil Muthuswamy , Halil Pasic , Song Gao , Aurelien Jarno , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?C=C3=A9dri?= =?utf-8?q?c_Le_Goater?= , Andrey Smirnov , Marcel Apfelbaum , Eduardo Habkost , "Michael S. Tsirkin" , Marcelo Tosatti , qemu-riscv@nongnu.org, Palmer Dabbelt , Alexander Graf , Markus Armbruster , John Snow , Paolo Bonzini , Peter Xu , Stefan Weil , Harsh Prateek Bora , Hailiang Zhang , Hyman Huang , Michael Roth , Fam Zheng , Stefano Stabellini , Vladimir Sementsov-Ogievskiy , David Gibson , Artyom Tarasenko , Stefan Hajnoczi , Stafford Horne , Liu Zhiwei , David Woodhouse , Cameron Esfahani , Eric Farman , Jason Wang , Nicholas Piggin , Ilya Leoshkevich , Peter Maydell , Richard Henderson , Hanna Reitz , Huacai Chen , Jagannathan Raman , Elena Ufimtseva , Bin Meng , Fabiano Rosas , Akihiko Odaki , David Hildenbrand Subject: [PULL 1/6] iothread: Remove unused Error** argument in aio_context_set_aio_params Date: Mon, 8 Jan 2024 11:37:30 -0500 Message-ID: <20240108163735.254732-2-stefanha@redhat.com> In-Reply-To: <20240108163735.254732-1-stefanha@redhat.com> References: <20240108163735.254732-1-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 Received-SPF: pass client-ip=170.10.133.124; envelope-from=stefanha@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.243, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-ppc@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Philippe Mathieu-Daudé aio_context_set_aio_params() doesn't use its undocumented Error** argument. Remove it to simplify. Note this removes a use of "unchecked Error**" in iothread_set_aio_context_params(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster Signed-off-by: Stefan Hajnoczi Message-ID: <20231120171806.19361-1-philmd@linaro.org> --- include/block/aio.h | 3 +-- iothread.c | 3 +-- util/aio-posix.c | 3 +-- util/aio-win32.c | 3 +-- util/main-loop.c | 5 +---- 5 files changed, 5 insertions(+), 12 deletions(-) diff --git a/include/block/aio.h b/include/block/aio.h index af05512a7d..c802a392e5 100644 --- a/include/block/aio.h +++ b/include/block/aio.h @@ -699,8 +699,7 @@ void aio_context_set_poll_params(AioContext *ctx, int64_t max_ns, * @max_batch: maximum number of requests in a batch, 0 means that the * engine will use its default */ -void aio_context_set_aio_params(AioContext *ctx, int64_t max_batch, - Error **errp); +void aio_context_set_aio_params(AioContext *ctx, int64_t max_batch); /** * aio_context_set_thread_pool_params: diff --git a/iothread.c b/iothread.c index b753286414..6c1fc8c856 100644 --- a/iothread.c +++ b/iothread.c @@ -170,8 +170,7 @@ static void iothread_set_aio_context_params(EventLoopBase *base, Error **errp) } aio_context_set_aio_params(iothread->ctx, - iothread->parent_obj.aio_max_batch, - errp); + iothread->parent_obj.aio_max_batch); aio_context_set_thread_pool_params(iothread->ctx, base->thread_pool_min, base->thread_pool_max, errp); diff --git a/util/aio-posix.c b/util/aio-posix.c index 7f2c99729d..266c9dd35f 100644 --- a/util/aio-posix.c +++ b/util/aio-posix.c @@ -777,8 +777,7 @@ void aio_context_set_poll_params(AioContext *ctx, int64_t max_ns, aio_notify(ctx); } -void aio_context_set_aio_params(AioContext *ctx, int64_t max_batch, - Error **errp) +void aio_context_set_aio_params(AioContext *ctx, int64_t max_batch) { /* * No thread synchronization here, it doesn't matter if an incorrect value diff --git a/util/aio-win32.c b/util/aio-win32.c index 948ef47a4d..d144f9391f 100644 --- a/util/aio-win32.c +++ b/util/aio-win32.c @@ -438,7 +438,6 @@ void aio_context_set_poll_params(AioContext *ctx, int64_t max_ns, } } -void aio_context_set_aio_params(AioContext *ctx, int64_t max_batch, - Error **errp) +void aio_context_set_aio_params(AioContext *ctx, int64_t max_batch) { } diff --git a/util/main-loop.c b/util/main-loop.c index 797b640c41..63b4cda84a 100644 --- a/util/main-loop.c +++ b/util/main-loop.c @@ -192,10 +192,7 @@ static void main_loop_update_params(EventLoopBase *base, Error **errp) return; } - aio_context_set_aio_params(qemu_aio_context, base->aio_max_batch, errp); - if (*errp) { - return; - } + aio_context_set_aio_params(qemu_aio_context, base->aio_max_batch); aio_context_set_thread_pool_params(qemu_aio_context, base->thread_pool_min, base->thread_pool_max, errp);