From nobody Sat Feb 7 07:12:14 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1642599155; cv=none; d=zohomail.com; s=zohoarc; b=KAOcbkGJ2Jyux6RJtTZ/QnK/9UqWSiFhtRpzeOg6lRclhh7rY8DYDHQYQYc5FGG3Aa0HVGCa1nV36006TeYc0JQ5Payt3OS0rmRJwJujgerwhNXeKeUZiGZgVOiwFLbddAm+MEOyyCYrp3R+OEjnhl5+/dKUsSYQQAmx750qWrk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642599155; h=Content-Type: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=Ye2wdlSyTXB9kAhqrvcWD6oYPpSFBXorlJI5IiL9waI=; b=OJZr37GiDgc1ECZDkWpv6/oIRJWIk2gAaqYbdJof0/anJpFM3l8v4fz2nYON/XWnboCObCkxG74mx36iiYrilaiOrkeaG6pu94k3d2hQ+nJIArr+cjj8/GCZIx/7znRKNedmRmoqMhoyFLOeHOEorE4qxwNhucOyvwro5C2zaMo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1642599155698563.502975898064; Wed, 19 Jan 2022 05:32:35 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-86--VC65mLHPYuWvMnPTMTz1Q-1; Wed, 19 Jan 2022 08:32:32 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3E763190A7AA; Wed, 19 Jan 2022 13:32:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1F213105B1F0; Wed, 19 Jan 2022 13:32:27 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 523101802E34; Wed, 19 Jan 2022 13:32:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20JDWP0w008990 for ; Wed, 19 Jan 2022 08:32:25 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4AB477DE50; Wed, 19 Jan 2022 13:32:25 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9F71C7DE4D; Wed, 19 Jan 2022 13:32:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642599153; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Ye2wdlSyTXB9kAhqrvcWD6oYPpSFBXorlJI5IiL9waI=; b=gFtWlCPCTQCbas5bD8lpApO5YTadoN5Zs2DAbYz0G5FpBMwQBMJnjuxB/qdFZhMb4efEH1 Xw9NbrU0PIB0ejrI/O6w6bbB6ABXJ/UL8ycAljvE3KYn3Iv9gSw4alLPavgP0FVsISSUpb vyJoStH+C0u9B4/rN1D8DYJismpex9k= X-MC-Unique: -VC65mLHPYuWvMnPTMTz1Q-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v1 1/5] qemuBuildMemoryDeviceProps: Fix const correctness Date: Wed, 19 Jan 2022 14:32:14 +0100 Message-Id: <419a199d71fa098e41ae3b263bb5e1ade33d9d3c.1642598968.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: david@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1642599157813100001 Content-Type: text/plain; charset="utf-8" The @mem agrument of qemuBuildMemoryDeviceProps() function is only read from. Make this fact obvious from the function declaration too. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 2 +- src/qemu/qemu_command.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index bca867a492..fb87649e65 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4002,7 +4002,7 @@ qemuBuildMemoryDimmBackendStr(virCommand *cmd, =20 virJSONValue * qemuBuildMemoryDeviceProps(const virDomainDef *def, - virDomainMemoryDef *mem) + const virDomainMemoryDef *mem) { g_autoptr(virJSONValue) props =3D NULL; const char *device =3D NULL; diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h index dbdf3a4793..dd981e333f 100644 --- a/src/qemu/qemu_command.h +++ b/src/qemu/qemu_command.h @@ -154,7 +154,7 @@ int qemuBuildMemoryBackendProps(virJSONValue **backendP= rops, =20 virJSONValue * qemuBuildMemoryDeviceProps(const virDomainDef *def, - virDomainMemoryDef *mem); + const virDomainMemoryDef *mem); =20 /* Current, best practice */ virJSONValue * --=20 2.34.1