From patchwork Thu Dec 19 08:32:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 852022 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp1365810wrq; Thu, 19 Dec 2024 00:33:47 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUUhhwqA3gmMLLHosc6HpL73Nc0gVAzOSI1G6hqmqdv4HycLg8JC/TjfHPvvpYT3j/SojNXMA==@linaro.org X-Google-Smtp-Source: AGHT+IGZUaynMc+yqFxQTPCsjDEXqrQRshXbynE07/4mRaogQJqSPRNHW/ppAZDT16hp37ULv5Yz X-Received: by 2002:a05:620a:198c:b0:7b1:45be:2e87 with SMTP id af79cd13be357-7b86373030bmr760027685a.18.1734597227499; Thu, 19 Dec 2024 00:33:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734597227; cv=none; d=google.com; s=arc-20240605; b=AghE7HENHTNkCZdou6epEeD9TJJ45eRSL2IJoHEoAX/1jIQW5+p6PhMi208Zg3EdLB dJE0SoC7FSi5sDrw3z1A9CvtmQdGlQ6zO7YMO5oBgZXStRJ7bVHAXDvS+1vuVaT3fA00 XO/ndNvOLv2i2e6En2EEn98W14QZZGpPypNZ5m3/U6JoKDr2eRPigVNFEppkUyib5EmR 4TcEPWVtSUG2YByy7K8YP4H3b9zc/szGmda16v0ZjgF9U0xkNPGmeT+MP/cx6mpSZJy+ AKmm7dkHOFarljJrWiBWJCqe3B02V6ciodXSWsd96uAszSvHzl/V674Yh5JP0mxBHMNH 7vVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kgfb1jJ+uI0m2LNzjpbnbFnNCYuuMLTRbLqF62ceNkc=; fh=mN+7zamMqtxpbv5qGNGIO/QHsXnjUAqHW/yN5gisKlY=; b=VHzjCLa18DMH5JbuSQE9wfG8/VWdzmisfScJyFkSdXzL0DXhX0HuXcCjTZOmXkMXDT /JGioj7lSEKLWZkLDwz3RNx9Ri1oxy9ETVuKfDu4wNW5Yl6WyOxQe3y13360uBrZNkoI 3GB6qwcbzfETFxrCApILzVEgaXgu5O1cQVZHCKpZpjgMJlfOEMboap3TikUfUdUPXn+R UaGFB1++tqS2W0DGJf8xPDChjnB1AJlm8JBcTgUwFysI8wfXQhu7sNIrCyGs63Jq2DKx 0oxRhA5hgzC4jIGMt7hclmLSalJveZFsbh0wjHvqX1Es8M3SVu9c0VVJz+ix3R+4V/GJ XEmA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dHoNFIlO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b9ac2cbfcdsi113784285a.168.2024.12.19.00.33.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Dec 2024 00:33:47 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dHoNFIlO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOByJ-00059k-Nt; Thu, 19 Dec 2024 03:33:27 -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 1tOByG-0004zj-RH for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:24 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOByF-0005Bt-7k for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597202; 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=kgfb1jJ+uI0m2LNzjpbnbFnNCYuuMLTRbLqF62ceNkc=; b=dHoNFIlOLrD6VJlkMVd2l7XQiqCLp7VRkLNTp533cPe2IXSjU3LUuEXJkYkwOhNJwIs2Ax MVzUDQ/0GBqFqLzNfZQPd9OzKTeDXH3DoH6EBVF2fRZYjDJsL7KNf8fr15PeFKHNfH51xi 2GArAyrOz8myu4yutliHLie7dJeVM0E= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-263-7lPD2bOZNzqfbRve80DOkw-1; Thu, 19 Dec 2024 03:33:20 -0500 X-MC-Unique: 7lPD2bOZNzqfbRve80DOkw-1 X-Mimecast-MFC-AGG-ID: 7lPD2bOZNzqfbRve80DOkw Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-436289a570eso4202735e9.0 for ; Thu, 19 Dec 2024 00:33:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597199; x=1735201999; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kgfb1jJ+uI0m2LNzjpbnbFnNCYuuMLTRbLqF62ceNkc=; b=PHW4BjhMypvM/sTSrfkkvsfuELEVLIDHD2sEI2hv/rkgNX0pjQL7tRFAad/vsqFIjb tpub3XdWK3/dgSP606shxSDK+bAMU9rAqSnNGxzeplMObHpUuKqlglH8vgnnPUFdMx75 V6259ut2a/1HR6sWQ5QhABsoS4bqqwP8fym0hsmjdUXBEsWOYizHn5s2X+cCeALrcO1J cj488bhO8g2EpooNN2on/KEhhlxjncAt5hPDhTibVHbgnjUB39SY4ADFyOqaIPwJ9kaf yzqDg9GozUhO0fopNbLF1SU1M+T9Zp5xk8JpgJDAEtepk1Ofl3apBghv7+iMGNGo5whi 8yUQ== X-Gm-Message-State: AOJu0YziB2cF4/BE3JGh2KUmjmrf1tIdf9Vy2yEUm0KovJgpvxF1km4f gjZzRN0C0sNND03CHm2+BQ6R6VhMxxcJG7VgLGJl/FjMxGt9zYWtzLhhxoYM/bCAZEKozycNFmR gFm2C81fZntmp10r/G8A8Nwq83ilfAV80Upz+lxAsh0rWaDoA/03t6bk7jfItHkioJRITocfxBy NNC8pgQ8guX/CeJhQ2c8+17N97jGcHJ2JlLLB0 X-Gm-Gg: ASbGnctuF+JDRVWG2IlIUwLtyQgKSb7GZb/i5W5kgFN3qgCGf8VWzEn+85XEDJlG6OB KqxybXUrT7NK0vYZ5BgQGlbwDROLSBs44NMB5S7BXg0J9HAiIbqx3w+5pIBR7SVu0CjwBM9aSzr 7lisLNO+3t07XWM6hPfGDACxXizTvZquxKWBMc5js8XYEBZqb1ZPiXCD6+OvyHWcX7+2YRDY8wS UuHRVZeGGhRjgQEqGwEK+0vht8qTYHpEvQmnYoR6+3WC6pToAWL48Me3jy6 X-Received: by 2002:a5d:6da1:0:b0:388:c75d:be97 with SMTP id ffacd0b85a97d-38a19af8799mr2341174f8f.11.1734597199199; Thu, 19 Dec 2024 00:33:19 -0800 (PST) X-Received: by 2002:a5d:6da1:0:b0:388:c75d:be97 with SMTP id ffacd0b85a97d-38a19af8799mr2341148f8f.11.1734597198765; Thu, 19 Dec 2024 00:33:18 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c828e7asm986991f8f.21.2024.12.19.00.33.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:14 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 23/41] hw/core/qdev-properties: Constify Property argument to PropertyInfo.print Date: Thu, 19 Dec 2024 09:32:10 +0100 Message-ID: <20241219083228.363430-24-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241219083228.363430-1-pbonzini@redhat.com> References: <20241219083228.363430-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 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_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson There is exactly one instance of this method: print_pci_devfn. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-24-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini --- include/hw/qdev-properties.h | 2 +- hw/core/qdev-properties-system.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h index 447767688b6..bf27375a3cc 100644 --- a/include/hw/qdev-properties.h +++ b/include/hw/qdev-properties.h @@ -34,7 +34,7 @@ struct PropertyInfo { const char *description; const QEnumLookup *enum_table; bool realized_set_allowed; /* allow setting property on realized device */ - int (*print)(Object *obj, Property *prop, char *dest, size_t len); + int (*print)(Object *obj, const Property *prop, char *dest, size_t len); void (*set_default_value)(ObjectProperty *op, const Property *prop); ObjectProperty *(*create)(ObjectClass *oc, const char *name, const Property *prop); diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c index 22ea1ed3583..1034e9b5809 100644 --- a/hw/core/qdev-properties-system.c +++ b/hw/core/qdev-properties-system.c @@ -869,7 +869,7 @@ out: visit_end_alternate(v, (void **) &alt); } -static int print_pci_devfn(Object *obj, Property *prop, char *dest, +static int print_pci_devfn(Object *obj, const Property *prop, char *dest, size_t len) { int32_t *ptr = object_field_prop_ptr(obj, prop);