From nobody Tue May 21 00:10:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=quarantine dis=quarantine) header.from=huawei.com ARC-Seal: i=1; a=rsa-sha256; t=1670504636; cv=none; d=zohomail.com; s=zohoarc; b=SHfEZdfv1tzTE5/HKo34Z2RhUBqeqC/FLKj1TfV8DtWfj8m5uMaoCuiUPwR13Ut+3WW+urXVRLVccKqvy1/jKEe6cS09Wx1RS8oQm1kUyCPYJ1keelLnq37BGidmcvYGr1GbSglgcCSbWGd2t5/n8P7Xrytfzl4h44I0oLACTJo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670504636; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=iw+COB8WZZ5LeDfAeXsDVdgYFenXnzVPR8m+hcY7rP0=; b=GbN1HjMp/2KuoI1lZrJrsgWnLxdqmt6Pi5gRlUE56RJhgNGaga0gd/iGahBDQ16wYXQqfaqy0dUhh5xg6pe0MkpLzjqukjX2ladJgVaxUFp8Oim3dnExZm3iPGhtxaKAcOmgNhwse0U5160PRC4ao75D0uijPc1N73uGQseAqpY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=quarantine dis=quarantine) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1670504636119224.0665058617343; Thu, 8 Dec 2022 05:03:56 -0800 (PST) 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-625-PR8hSmsaMhi1PMB-2z_Q5Q-1; Thu, 08 Dec 2022 08:03:50 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4EDAD857D0A; Thu, 8 Dec 2022 13:03:47 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A38DC15BA8; Thu, 8 Dec 2022 13:03:47 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0D86C1946A44; Thu, 8 Dec 2022 13:03:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 03BEC1946A41 for ; Thu, 8 Dec 2022 13:03:45 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id D5D8C49BB61; Thu, 8 Dec 2022 13:03:45 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast08.extmail.prod.ext.rdu2.redhat.com [10.11.55.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CEA4149BB60 for ; Thu, 8 Dec 2022 13:03:45 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B05E13813F2D for ; Thu, 8 Dec 2022 13:03:45 +0000 (UTC) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-594-4z4HvtXrPtmvsTat81Go-Q-1; Thu, 08 Dec 2022 08:03:43 -0500 Received: from dggpeml500022.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NSZ3v5WZvzqSwR for ; Thu, 8 Dec 2022 20:59:23 +0800 (CST) Received: from localhost.localdomain (10.175.124.27) by dggpeml500022.china.huawei.com (7.185.36.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 8 Dec 2022 21:03:34 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670504634; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=iw+COB8WZZ5LeDfAeXsDVdgYFenXnzVPR8m+hcY7rP0=; b=WeqG6DLWEd/7QAbD8T+YXy8QVmDOZXtL9lLqEEq+6Lp/GOA6EkP5PiWNwcuXosroQzUUse 907ra16ruyISc01kUrhW9hPlZg8sBOnC6s+Q5GoNvP24WU22hfvt37Nrme03aqsGw91MfU nnM6Oe/A8kiPpSGcULb5+iqVyuQ/iPw= X-MC-Unique: PR8hSmsaMhi1PMB-2z_Q5Q-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: 4z4HvtXrPtmvsTat81Go-Q-1 From: Jiang Jiacheng To: Subject: [PATCH] qemu: fix several codecheck in qemu_monitor.c Date: Thu, 8 Dec 2022 20:52:35 +0800 Message-ID: <20221208125235.2941441-1-jiangjiacheng@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500022.china.huawei.com (7.185.36.66) X-CFilter-Loop: Reflected X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: yubihong@huawei.com, zhengchuan@huawei.com, linyilu@huawei.com, xiexiangyou@huawei.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1670504637769100001 Content-Type: text/plain; charset="utf-8" 1.clear passwd in debug log 2.alignment 3.use the same variable name for function definition and declaration Signed-off-by: Jiang Jiacheng Reviewed-by: Martin Kletzander --- src/qemu/qemu_monitor.c | 8 ++++---- src/qemu/qemu_monitor.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 80f262cec7..de9a1b26f6 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -943,7 +943,7 @@ qemuMonitorInitBalloonObjectPath(qemuMonitor *mon, case VIR_DOMAIN_MEMBALLOON_MODEL_XEN: case VIR_DOMAIN_MEMBALLOON_MODEL_NONE: virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("invalid model for virtio-balloon-pci")); + _("invalid model for virtio-balloon-pci")); return; case VIR_DOMAIN_MEMBALLOON_MODEL_LAST: default: @@ -2053,8 +2053,8 @@ qemuMonitorSetPassword(qemuMonitor *mon, if (!protocol) return -1; =20 - VIR_DEBUG("protocol=3D%s, password=3D%p, action_if_connected=3D%s", - protocol, password, action_if_connected); + VIR_DEBUG("protocol=3D%s, action_if_connected=3D%s", + protocol, action_if_connected); =20 QEMU_CHECK_MONITOR(mon); =20 @@ -3485,7 +3485,7 @@ qemuMonitorBlockExportAdd(qemuMonitor *mon, =20 int qemuMonitorGetTPMModels(qemuMonitor *mon, - char ***tpmmodels) + char ***tpmmodels) { VIR_DEBUG("tpmmodels=3D%p", tpmmodels); =20 diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index c690fc3655..7278f2e706 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -627,8 +627,8 @@ struct _qemuMonitorCPUInfo { }; typedef struct _qemuMonitorCPUInfo qemuMonitorCPUInfo; =20 -void qemuMonitorCPUInfoFree(qemuMonitorCPUInfo *list, - size_t nitems); +void qemuMonitorCPUInfoFree(qemuMonitorCPUInfo *cpus, + size_t ncpus); int qemuMonitorGetCPUInfo(qemuMonitor *mon, qemuMonitorCPUInfo **vcpus, size_t maxvcpus, @@ -1184,7 +1184,7 @@ int qemuMonitorNBDServerAdd(qemuMonitor *mon, const char *export, bool writable, const char *bitmap); -int qemuMonitorNBDServerStop(qemuMonitor *); +int qemuMonitorNBDServerStop(qemuMonitor *mon); =20 int qemuMonitorBlockExportAdd(qemuMonitor *mon, virJSONValue **props); --=20 2.33.0