From nobody Mon Nov 25 03:06:50 2024 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=1717509599; cv=none; d=zohomail.com; s=zohoarc; b=TUh9+lLtUF44OTHcI9DtUQDNgxfZ+mmeHzumvYb0ppBsxe7CDq7HngmDstf23ktNUZU6KcoaeC26MCItoB2Qrs7hi+JyqOElPjmyo6/3VyyazESm70MMvmAMSTG9p98nLVR86TjhEGo87tGmDNsUHrDyzPkAZSD5Wrc2A7yTWqE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717509599; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=pp691IpB1NZf075oTcVuBj9U4ExLmOj+fJ5FCO2R0yk=; b=WncX5qTYwDOwlvjsJCqb1LWTbg7oDwtucNov6A3HIag7Yltgeuzlj6PXgqutcMsE5/BrWhg9qGEqM4s/6Px/dgdrD4E5M6TrIsxylfFhwaxdKOSpbylRW4ya1yo7RFK747qaTrkvqYdLKFo95eiXwTA2sNUEgyvtYDePp0YjoZ8= 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 1717509599377104.31215311729841; Tue, 4 Jun 2024 06:59:59 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sEUhP-0006G7-OS; Tue, 04 Jun 2024 09:59:39 -0400 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 1sEUhP-0006Fe-3m for qemu-devel@nongnu.org; Tue, 04 Jun 2024 09:59:39 -0400 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 1sEUhN-0006jF-L7 for qemu-devel@nongnu.org; Tue, 04 Jun 2024 09:59:38 -0400 Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-116-kqGb5N_XPeGUGF7IKo9J9g-1; Tue, 04 Jun 2024 09:59:35 -0400 Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2e95a1fae88so44741891fa.0 for ; Tue, 04 Jun 2024 06:59:35 -0700 (PDT) Received: from step1.redhat.com (host-82-53-134-171.retail.telecomitalia.it. [82.53.134.171]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4212b838acdsm157331155e9.4.2024.06.04.06.59.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 06:59:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717509576; 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; bh=pp691IpB1NZf075oTcVuBj9U4ExLmOj+fJ5FCO2R0yk=; b=T20QfRsKp695zRGZf5Plire6XK63xixONH7ZloG+SJtwWJyaB26o6wxcXh7q+cms4aTOUg NPhapkQ8TvQSUL8rBSDnB+NLkQOzJiAmK8FgPUxPxH4cSd73Om3uV6DGkwmYhiIkfjhMJ6 1ZAA6x+Tf3lgrXnGi6NUhBEJtO65hOM= X-MC-Unique: kqGb5N_XPeGUGF7IKo9J9g-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717509573; x=1718114373; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pp691IpB1NZf075oTcVuBj9U4ExLmOj+fJ5FCO2R0yk=; b=grGa+WPGU12qPXhJ6Pop2UJVcF4p6kmDUYvzWC+e5y5NShZL8jVTiUr5jvJMXma2r/ KC9GjR3APOAGgjCMOxmS0NDt6nsnxbKgE0D8lNKximw6tnvY7rvj7gju21sRKENv6b3V /dPYk18cUPbmIUlulnlNnStPH8YP7p4hLvQWliX0ttfJZktntNvBnpksSCAssHGi86NR AIrfPKBsBv7EdLeGQU63zFTv9zoP7rlsKNJeWwS2L7Kfqj1vCJxx9YSzZUojdMndpX87 nhP8KGn9XfbDXKRWSegrCGqhXot8G0DIZOKxG96fErVAeMamS5se/+uxq3Ugle+j3kAA Bn5A== X-Gm-Message-State: AOJu0Yx7oiqANThC3zIYGb6D3rV3M0STWWCO6NfEmJWtjTEnKLQPDm7f mExyfwgXdNlFgoMoTikMUf37Tcu/VWw+X9m1tWOJh6Dz5K7cXZMeNOgJ65H+MrDaPWZ+60DjjNY KchQ/3+lZmRPdaC0lqv70hyOoG9vBOKJxmSa0EW0jBvyK1qaCoJGFqEr2RgI8lL9JEe+oLS/g4N nnxA6od7A0zaDJzTeczAWOF9gaAWbhuAg2An35 X-Received: by 2002:a2e:9c0f:0:b0:2de:cc70:2552 with SMTP id 38308e7fff4ca-2ea950c80a7mr82498031fa.10.1717509573600; Tue, 04 Jun 2024 06:59:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE945ScHyZG+oe9M/Px99v4OVCfwQ1Q/v0qLdS8Wr8sqJV1AsnSIc6E4JPhnan5scQlalVmhQ== X-Received: by 2002:a2e:9c0f:0:b0:2de:cc70:2552 with SMTP id 38308e7fff4ca-2ea950c80a7mr82497801fa.10.1717509573122; Tue, 04 Jun 2024 06:59:33 -0700 (PDT) From: Stefano Garzarella To: qemu-devel@nongnu.org Cc: Eric Blake , Eduardo Habkost , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Markus Armbruster , Paolo Bonzini , Stefano Garzarella Subject: [PATCH] qapi/qom: make some QOM properties depend on the build settings Date: Tue, 4 Jun 2024 15:59:31 +0200 Message-ID: <20240604135931.311709-1-sgarzare@redhat.com> X-Mailer: git-send-email 2.45.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=sgarzare@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, RCVD_IN_MSPIKE_H4=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=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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1717509599526100001 Content-Type: text/plain; charset="utf-8" Some QOM properties are associated with ObjectTypes that already depend on CONFIG_* switches. So to avoid generating dead code, let's also make the definition of those properties dependent on the corresponding CONFIG_*. Suggested-by: Markus Armbruster Signed-off-by: Stefano Garzarella Reviewed-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- qapi/qom.json | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/qapi/qom.json b/qapi/qom.json index 38dde6d785..ae93313a60 100644 --- a/qapi/qom.json +++ b/qapi/qom.json @@ -222,7 +222,8 @@ ## { 'struct': 'CanHostSocketcanProperties', 'data': { 'if': 'str', - 'canbus': 'str' } } + 'canbus': 'str' }, + 'if': 'CONFIG_LINUX' } =20 ## # @ColoCompareProperties: @@ -305,7 +306,8 @@ ## { 'struct': 'CryptodevVhostUserProperties', 'base': 'CryptodevBackendProperties', - 'data': { 'chardev': 'str' } } + 'data': { 'chardev': 'str' }, + 'if': 'CONFIG_VHOST_CRYPTO' } =20 ## # @DBusVMStateProperties: @@ -514,7 +516,8 @@ 'data': { 'evdev': 'str', '*grab_all': 'bool', '*repeat': 'bool', - '*grab-toggle': 'GrabToggleKeys' } } + '*grab-toggle': 'GrabToggleKeys' }, + 'if': 'CONFIG_LINUX' } =20 ## # @EventLoopBaseProperties: @@ -719,7 +722,8 @@ 'base': 'MemoryBackendProperties', 'data': { '*hugetlb': 'bool', '*hugetlbsize': 'size', - '*seal': 'bool' } } + '*seal': 'bool' }, + 'if': 'CONFIG_LINUX' } =20 ## # @MemoryBackendEpcProperties: @@ -736,7 +740,8 @@ ## { 'struct': 'MemoryBackendEpcProperties', 'base': 'MemoryBackendProperties', - 'data': {} } + 'data': {}, + 'if': 'CONFIG_LINUX' } =20 ## # @PrManagerHelperProperties: @@ -749,7 +754,8 @@ # Since: 2.11 ## { 'struct': 'PrManagerHelperProperties', - 'data': { 'path': 'str' } } + 'data': { 'path': 'str' }, + 'if': 'CONFIG_LINUX' } =20 ## # @QtestProperties: @@ -872,7 +878,8 @@ ## { 'struct': 'RngRandomProperties', 'base': 'RngProperties', - 'data': { '*filename': 'str' } } + 'data': { '*filename': 'str' }, + 'if': 'CONFIG_POSIX' } =20 ## # @SevGuestProperties: --=20 2.45.1