From nobody Sat Apr 12 00:57:20 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1665146584; cv=none; d=zohomail.com; s=zohoarc; b=MpaNSSDCkz+LLbI7gePjJlBUVe/xsZqgsZNWnzjH0w/Wg5VLYJr1R+MpGmIYRy2oUPitk6uBHsTEh1gyHkkGEW5XOFC6HazQKl9GCSIM0xHjl+Simv5u5puD2mYRNiBd98irjaxgeG1QCgnx4eBTfMKkB/vNw8jytwq3WBwNpY4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665146584; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=mzHMEFUxv4YdLPsJiANuUHHkeNTKF4yHPtjR6dkaRec=; b=FJhQbEFJOhOCinex+IRG1HjwoyljlgGoEQeORvKHb9WdNAecgN4ItAmNd2aq+L8MBb+p11P7p3wYLaanSLT/ApgP/yWB5GCcMusunFXTxEvvOEK8Q9Zd1acCxgJUxhdPCPA0S6TvLUv61fHfpO7dBSR3rws31IcWPbwbQTTmzSY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 166514658412793.45765294630212; Fri, 7 Oct 2022 05:43:04 -0700 (PDT) Received: from localhost ([::1]:52164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogmgv-0003YK-WE for importer@patchew.org; Fri, 07 Oct 2022 08:43:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogkuB-0005a0-SJ for qemu-devel@nongnu.org; Fri, 07 Oct 2022 06:48:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:27963) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogkuA-0003Dt-0B for qemu-devel@nongnu.org; Fri, 07 Oct 2022 06:48:35 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-660-xL4_VxImPCCscI9z7ZyjeA-1; Fri, 07 Oct 2022 06:48:31 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0D302185A78F; Fri, 7 Oct 2022 10:48:31 +0000 (UTC) Received: from merkur.fritz.box (unknown [10.39.192.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4AFC6200C0DE; Fri, 7 Oct 2022 10:48:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665139712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mzHMEFUxv4YdLPsJiANuUHHkeNTKF4yHPtjR6dkaRec=; b=Jp30KZ2uFFAeSLCcophi6xM6IFi7tRg6oT89mONJ2q8UTTAr7UDGK4xhGKEbAukMrolgZe Le+Mih37k7Fg5cjcpUzco0XUvrXvw6Nazl6G/kYuMyMSzYsat7UzuItWErwbIxMUAQ5j1W Aq81ANBqPsDoneW4OSvz+8zy6IDJRhc= X-MC-Unique: xL4_VxImPCCscI9z7ZyjeA-1 From: Kevin Wolf To: qemu-block@nongnu.org Cc: kwolf@redhat.com, stefanha@redhat.com, qemu-devel@nongnu.org Subject: [PULL 31/50] job.c: API functions not used outside should be static Date: Fri, 7 Oct 2022 12:47:33 +0200 Message-Id: <20221007104752.141361-32-kwolf@redhat.com> In-Reply-To: <20221007104752.141361-1-kwolf@redhat.com> References: <20221007104752.141361-1-kwolf@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@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-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1665146584778100001 Content-Type: text/plain; charset="utf-8" From: Emanuele Giuseppe Esposito 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 Reviewed-by: Stefan Hajnoczi Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf Message-Id: <20220926093214.506243-4-eesposit@redhat.com> Signed-off-by: Kevin Wolf --- include/qemu/job.h | 18 ------------------ job.c | 22 +++++++++++++++++++--- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/include/qemu/job.h b/include/qemu/job.h index 8530c6a4e1..e3e31e2548 100644 --- a/include/qemu/job.h +++ b/include/qemu/job.h @@ -358,18 +358,6 @@ JobTxn *job_txn_new(void); */ void job_txn_unref(JobTxn *txn); =20 -/** - * @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 transac= tion. - * The caller must call either job_txn_unref() or job_completed() to relea= se - * the reference that is automatically grabbed here. - * - * If @txn is NULL, the function does nothing. - */ -void job_txn_add_job(JobTxn *txn, Job *job); - /** * Create a new long-running job and return it. * @@ -431,12 +419,6 @@ void job_progress_set_remaining(Job *job, uint64_t rem= aining); */ void job_progress_increase_remaining(Job *job, uint64_t delta); =20 -/** 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 7365db827a..9500b5b36e 100644 --- a/job.c +++ b/job.c @@ -125,7 +125,17 @@ void job_txn_unref(JobTxn *txn) } } =20 -void job_txn_add_job(JobTxn *txn, Job *job) +/** + * @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 transac= tion. + * The caller must call either job_txn_unref() or job_completed() to relea= se + * the reference that is automatically grabbed here. + * + * If @txn is NULL, the function does nothing. + */ +static void job_txn_add_job(JobTxn *txn, Job *job) { if (!txn) { return; @@ -427,12 +437,18 @@ void job_progress_increase_remaining(Job *job, uint64= _t delta) progress_increase_remaining(&job->progress, delta); } =20 -void job_event_cancelled(Job *job) +/** + * To be called when a cancelled job is finalised. + */ +static void job_event_cancelled(Job *job) { notifier_list_notify(&job->on_finalize_cancelled, job); } =20 -void job_event_completed(Job *job) +/** + * To be called when a successfully completed job is finalised. + */ +static void job_event_completed(Job *job) { notifier_list_notify(&job->on_finalize_completed, job); } --=20 2.37.3