From patchwork Wed Feb 12 15:54:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 864473 Delivered-To: patch@linaro.org Received: by 2002:a5d:4cc5:0:b0:38f:210b:807b with SMTP id c5csp191292wrt; Wed, 12 Feb 2025 07:54:45 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWGzJ6u15H01OxLUkWwd3K/qeNISGpRXbixhBbPaQ/ab55kZwIGCnYJBlHdtQbhv23b7OwW2w==@linaro.org X-Google-Smtp-Source: AGHT+IHmNdAbW1i7kGV1aC0RP2RXrGITUTuB4PMO9C0mxeSs2gB/7zqhabNGR+rB2LdwnyyOCPJd X-Received: by 2002:a05:620a:4593:b0:7b7:12e:48eb with SMTP id af79cd13be357-7c0702843b0mr595009685a.17.1739375684967; Wed, 12 Feb 2025 07:54:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1739375684; cv=none; d=google.com; s=arc-20240605; b=WNFltKPEBxRyx3YZU9kMZb+H3zDP+mI8Duatog1sovh/34xkPm0Jg+rcTGLyw9PlH5 hhL8r0gnhh4nt27f2WQp9i+zC1FFYBYFz5t0ms1tMJaKKI/kGXuzyf9DRRkaxJ1eyD8J JtvjA+vlGuhsdE28pxlxq+LnWWKLRFE+iuH+dZ5mhAJa2qTMh2EWYv/rHqZMOaAQgVCD HHxiDMrwMeBqIIwBc7IxnMNaiuKkLcH1/dmpxL2hY35H3ROfhJtugnYL/AaM10s2xhuv AsGr6sRjviKKfmAJZYSHdixND7VqL0k5kUtnFcc40I6nJcIFJ6QOpnTen+L+ef0+uVBm 1Q/Q== 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=9jgwvuUHnyL21kGDz/lsBVep518SWeLt+3+GCxJqisU=; fh=qtn8prgQtzf5IzCNvLChUZDElvNECP6ej9YfjQeBz3I=; b=PItXa8188HjzAB44OC6tmcPYE9WV91zzOU2NsnPo/NkYJOg7hr01Z5hIIfizTnjOyK yRm2mGZ1XeTc+d18oIzPowNIxVtnX76O+9oqPL7ThsSH75F/pEH8bL0NzfWfdcR+ARBh dfTP2F8EAt6vfuHj+uzK/c1M0XTDIoP5BjSWcBEnrUJKYc9qTSx+MuWvNxOxZFj8uGLd P6LpTjw50fzDgCBMAmUzfdX6R8oOX0fLaS98QHQ/pxkzs/LOahCU0n8QGzDCPOjPLSFe 5EsKXIPfwFN/oE1Ces6VpF+VN1YcNJoq9TdWBxIYt0VSnFaq4hQC8PfmbPiTj+DJ6u3k t+Fg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="DkjHD/up"; 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=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c07709733csi100304885a.393.2025.02.12.07.54.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Feb 2025 07:54:44 -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=@linaro.org header.s=google header.b="DkjHD/up"; 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=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tiF4F-0004lu-MY; Wed, 12 Feb 2025 10:54:28 -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 1tiF47-0004d9-P5 for qemu-devel@nongnu.org; Wed, 12 Feb 2025 10:54:20 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tiF46-0000r4-0y for qemu-devel@nongnu.org; Wed, 12 Feb 2025 10:54:19 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4393dc02b78so26559575e9.3 for ; Wed, 12 Feb 2025 07:54:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739375655; x=1739980455; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9jgwvuUHnyL21kGDz/lsBVep518SWeLt+3+GCxJqisU=; b=DkjHD/upr6mBwgtIfb8+lP2ZqZHgIpVE7/vnkgF4ofnSqIRHsUZN3v8gIh7mcpn8bX 4tYZWAHxXPbnfkADO2ioZxE4kC+9saoXXSuscLn/GSYk/ViO4YugNlWxIwS6Q5gSi6lw rGJvwHqeI2V5bupx7jXF9AewRFdIOPpSqTLqG/dFK1Zce1kSfNr7+CV/6pcaqIM6r58C TbBFeyPGauEPvn/aeM0txxHQZwmTLj0x/Yk7cRssHjXorlkvQOLzk3sbsJiBhpsEfR66 RsAp8aSlZZ4GZshJ25hI0ZzijQBtg2y1Btlz2lguq3/lUY092DvOpkibEJ1KvcE8OxBh AJdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739375655; x=1739980455; 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=9jgwvuUHnyL21kGDz/lsBVep518SWeLt+3+GCxJqisU=; b=uVBXhS3tsbFhQIZU7GD955TvVDtt9WMf0IcLgLVHWfZjJLzrw8QrYwoXnmRtNPfhor NtZ14yy48WJ23iEXsYiPP1EX/YFzbJMLn1hRUgBGgtMRkR6o7s2xO1JTmasYfPDwY4dU X/YGE+Gr29kOfSf1o6QQ2rR/U4x7vt+H/Z74GgsMhSxEeRGroq9z8XrPidpSroASEIfO zjjzGMYUR/SmpJ8Gv8NrZFPks2O2pkimedd21aOLE+ygG68GI4r+2hmpaqngTsI7B8fO /KMnJ0/FLSSAqn0yD0x4a5dc8E1IkWfHOTQG8KZv2721Ez+/LijGdHdVPNeGH2QQ3vdv oLqA== X-Gm-Message-State: AOJu0YxSCY1LCIqxRWNrCABGYWu70SVoyleEgcMHGawCy9mYam6f7KUP PPh4+ZsGHtI+P5vCsVTx7IsdxzzL11sYddIsxsk7ThH7Bf/xOGvKNGxEjgV1dbG0OI96En3V+J0 oTpI= X-Gm-Gg: ASbGncunlr4M/B9jOX5vh2DBZehxKwIooYHaj7fNcze1/2hEZCZ9bKNBQVURt8INqo1 QP7JVQamqOhhdECeOgUkMwJdUFTyS3XdIQx9MrzHdSShbfyTJ5eING2QyWKdIH7hTMXmW2KssRp DdYQTqrBo5L6ncSnDOvyI0FK3bi/5D5gMSwDkPT3DdMz7cbln8qcxe9r5CqMdpDHr/AJTqKpcaB lpMlhEyvkvLOFokWT4cjlv3lu48tFzDJ3nT0c1MGAzETgfzTaP3OIsM+xUMsH7UEF0EKqPFwhQa zFEay23T5Dogg7CaLbPAh7kPcS7ouQ8i0dgQnCT9xy/N0hP4LKsArPC6iXBFU+I4ROSAYxU= X-Received: by 2002:a05:600c:1548:b0:436:1b08:4c78 with SMTP id 5b1f17b1804b1-43959a997a5mr30960965e9.31.1739375655371; Wed, 12 Feb 2025 07:54:15 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4395a055bffsm23336625e9.12.2025.02.12.07.54.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 12 Feb 2025 07:54:14 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 28/29] hw: Declare various const data as 'const' Date: Wed, 12 Feb 2025 16:54:07 +0100 Message-ID: <20250212155408.29502-2-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250212155408.29502-1-philmd@linaro.org> References: <20250212155408.29502-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.google.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, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20250210133134.90879-7-philmd@linaro.org> --- hw/isa/vt82c686.c | 2 +- hw/rtc/m48t59-isa.c | 2 +- hw/rtc/m48t59.c | 2 +- hw/sensor/tmp421.c | 2 +- hw/usb/hcd-ehci-pci.c | 2 +- hw/usb/hcd-uhci.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 6f44b381a5f..43bd67eeef2 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -224,7 +224,7 @@ static void via_pm_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); - ViaPMInitInfo *info = data; + const ViaPMInitInfo *info = data; k->realize = via_pm_realize; k->config_write = pm_write_config; diff --git a/hw/rtc/m48t59-isa.c b/hw/rtc/m48t59-isa.c index 38bc8dcf100..9c3855a3ef1 100644 --- a/hw/rtc/m48t59-isa.c +++ b/hw/rtc/m48t59-isa.c @@ -129,7 +129,7 @@ static void m48txx_isa_class_init(ObjectClass *klass, void *data) static void m48txx_isa_concrete_class_init(ObjectClass *klass, void *data) { M48txxISADeviceClass *u = M48TXX_ISA_CLASS(klass); - M48txxInfo *info = data; + const M48txxInfo *info = data; u->info = *info; } diff --git a/hw/rtc/m48t59.c b/hw/rtc/m48t59.c index c9bd6f878fe..3fb2f27d9d1 100644 --- a/hw/rtc/m48t59.c +++ b/hw/rtc/m48t59.c @@ -639,7 +639,7 @@ static void m48txx_sysbus_class_init(ObjectClass *klass, void *data) static void m48txx_sysbus_concrete_class_init(ObjectClass *klass, void *data) { M48txxSysBusDeviceClass *u = M48TXX_SYS_BUS_CLASS(klass); - M48txxInfo *info = data; + const M48txxInfo *info = data; u->info = *info; } diff --git a/hw/sensor/tmp421.c b/hw/sensor/tmp421.c index 82e604279c5..007f7cd018b 100644 --- a/hw/sensor/tmp421.c +++ b/hw/sensor/tmp421.c @@ -68,7 +68,7 @@ struct TMP421State { struct TMP421Class { I2CSlaveClass parent_class; - DeviceInfo *dev; + const DeviceInfo *dev; }; #define TYPE_TMP421 "tmp421-generic" diff --git a/hw/usb/hcd-ehci-pci.c b/hw/usb/hcd-ehci-pci.c index d410c38a8a2..e00316721ac 100644 --- a/hw/usb/hcd-ehci-pci.c +++ b/hw/usb/hcd-ehci-pci.c @@ -182,7 +182,7 @@ static void ehci_data_class_init(ObjectClass *klass, void *data) { PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); DeviceClass *dc = DEVICE_CLASS(klass); - EHCIPCIInfo *i = data; + const EHCIPCIInfo *i = data; k->vendor_id = i->vendor_id; k->device_id = i->device_id; diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index 8528d493d63..0561a6d801a 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -1289,7 +1289,7 @@ void uhci_data_class_init(ObjectClass *klass, void *data) PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); DeviceClass *dc = DEVICE_CLASS(klass); UHCIPCIDeviceClass *u = UHCI_CLASS(klass); - UHCIInfo *info = data; + const UHCIInfo *info = data; k->realize = info->realize ? info->realize : usb_uhci_common_realize; k->exit = info->unplug ? usb_uhci_exit : NULL; From patchwork Wed Feb 12 15:54:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 864474 Delivered-To: patch@linaro.org Received: by 2002:a5d:4cc5:0:b0:38f:210b:807b with SMTP id c5csp191398wrt; Wed, 12 Feb 2025 07:55:03 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVuHKZEfRYi5szbzpWXuGfgIC6Blor/TK4Nd5/uGpKYRC+K0LNj8kEy7aMeh7ilQV7ggml3zQ==@linaro.org X-Google-Smtp-Source: AGHT+IE8gqMNbRCTXeeKU8G6AiAyY2XFncw9mNUa7gHAQoiwMTOI+m1UqsJ6HtyQdjhvzrbyEreR X-Received: by 2002:a05:620a:454b:b0:7c0:62ed:6ea8 with SMTP id af79cd13be357-7c06fc571e8mr537666185a.4.1739375702923; Wed, 12 Feb 2025 07:55:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1739375702; cv=none; d=google.com; s=arc-20240605; b=NjxzQvVnStD2psXar8NQj2nE0H59SJVVTHjf3JJuwr0cjkmCoAZkarHqJiGPV93gvr QLnKg66NYWPw426719fuJXpR9msNb4quvEU+AqnNolgcWPqbM1zpBaitR2ds3WdKnjwg PWfehSgMnNOhDzXjjXbAgjDJfFvK2X79fL51zRJmcQ6C5OkRwIeKJm064r6x4Up99Cis 3ygqP4MSQOgKJpfTvRbw7Tk//ivkfYfSwedtq0MluIVPgX1XDJRdl2U8HkKZz0EbOIVW 1xVMPTJoQLbUvGC0Y3MrTL6jznHCI0EXvdNHRVwtSZQdyKDOc1wWmIO3TCtgWLDK3JRz vF6A== 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=4Vn4jQMdtR/P+0AJ2AwebyY6ZejIqv+DTnLMTFiQonU=; fh=qtn8prgQtzf5IzCNvLChUZDElvNECP6ej9YfjQeBz3I=; b=AkJ+u2y9GnW0oO63KHF93dkNv+BhCzLbOw/sUxCSLoYMmI/qX54ih/FfKBvZ7xHYaM 9drN0UOhIC0OtyvsOdnY3gTezmR1hjzwEDFvm08rVss0i89LHiolh4u9AeQ2wBBCthq/ e6poBhSkHAVWHv1Rl7lWj4MzFw/bEWCQnyZfesZSfJUnBO4waoJfy0yRzKwun25zvoWP jrH4ON3GoaP+gnfXmHHlJ+Zi6xkmsFsTnca2cuxnUGTENbQkKEGsJAUu9lt59vHRXme1 7vkCxWs8e1+VfJLeF6I2y6jOW6Q6fIC2SVhStrBTQvQrjSB0Af3yab2GT0FQYt45Fe77 TazA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ITfPq81i; 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=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c05fe88eb9si615343685a.14.2025.02.12.07.55.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Feb 2025 07:55:02 -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=@linaro.org header.s=google header.b=ITfPq81i; 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=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tiF4G-0004mG-HK; Wed, 12 Feb 2025 10:54:28 -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 1tiF4C-0004i0-Oz for qemu-devel@nongnu.org; Wed, 12 Feb 2025 10:54:25 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tiF4B-0000t2-2R for qemu-devel@nongnu.org; Wed, 12 Feb 2025 10:54:24 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4394345e4d5so26651445e9.0 for ; Wed, 12 Feb 2025 07:54:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739375660; x=1739980460; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4Vn4jQMdtR/P+0AJ2AwebyY6ZejIqv+DTnLMTFiQonU=; b=ITfPq81i8XHGdMjmihXaRggNwmRwm4tQlPCo0U0LIb1AWy/3L+3RxfzSsb8jBMll4k HIirzTofHdnS0ET3yhL3cikjxDRlNVScQeSlRBqtiyb9nn1XQ0bVccx0oyOLG1ijEHB3 Fv1xNLiwNjXjs2+bL54V641PleN2Bl2YWBa+5FhkNooAVdy92GCU03h9FpjWDxzjTdb5 d4T6SIMx1a2XMAOmFvxOvvzNF+XlOZXYpr2zeKD5TKZ2PJMnXSmaAEGvgwucUOsHW8wY 2RKuefs/E+w7f+v1pVM0O2IqS/aBMbrreVZNYEFSG/1vk1u2QwMcgURwA6kB5uyLfKaA yZ3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739375660; x=1739980460; 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=4Vn4jQMdtR/P+0AJ2AwebyY6ZejIqv+DTnLMTFiQonU=; b=P2tfgJvO8KoNf+K2U4Mg0clvfFg9Aa+Tej3zyG9aB/LCl1tmQpWQg1N+UOdry6KaF5 DdIAW5romwTwZ/STO+O83OV3ExX0xsQWtprEhaPXyPbpjUBsOa6MfcunBBUF6+QD+VPE w6dU5m2ivwRBTntAxMO4pYujgI0lKrYK9SKa51UqP9UkR70n30Nzpa4A8RzeB1QXerCY gXm2MGcFt3EkPyIVgN+ir3Eh+m7UNSQUHktDU2sc+HgdSWuEb9RjBfpe7xAJs3ToodD4 XmBNXT+8ZHfbO1wULw6RF7tsKx4vbd+0+MXznuGAP2fuEvYkAR36CEUSUQewWHCOpcrd X9Pw== X-Gm-Message-State: AOJu0YwJAuj4h0NvqqUySgf9rhd2ojz9g0WJu6iDcbAc3TcRYXjFQXpO OnjA4co5b1bXTM+v3ezEVSFBGCDqSxGSP/Xt1tJCDiqilfm8amaxpf/FFxRc2Ey80NQwhoA3leh BfRU= X-Gm-Gg: ASbGncsM1fpip4roXwzTunZKB7x7ADN3lNfJm/psZa7L1FxL1sK0l2Le7Egh9bfkHrG xYrSU4iT6TKdnJAZTb6CWO0RsVM1QAB4tHNs/yGV1Ugx2XlH5gVtzXxbwS9fEmMZY5pRJM4fqh/ AIMe57UG3EQBJl3hc3HJ5ZUyv0X+2Dmbe0k/h9EWHHa3k6tFn3R4Conh3GtzCcZINxnwddcRiVk vSWI/nNClOn6A91YPcEj1LVHPjm7Yl/t3o9CpsYLUiUjYhbbkmMxS1vED1vQGZhzBOomY8BKL3b 3tS4ymil0VWz4yS0e+wzUYZ3MNTexy3/kfFsezJYVX1mRqW8ZMB8ZlJsFlikR6uX3D1xLXY= X-Received: by 2002:a05:600c:3b84:b0:439:488b:985d with SMTP id 5b1f17b1804b1-43958165f46mr37758345e9.4.1739375660178; Wed, 12 Feb 2025 07:54:20 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4395a055c7esm23921045e9.14.2025.02.12.07.54.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 12 Feb 2025 07:54:19 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 29/29] hw: Make class data 'const' Date: Wed, 12 Feb 2025 16:54:08 +0100 Message-ID: <20250212155408.29502-3-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250212155408.29502-1-philmd@linaro.org> References: <20250212155408.29502-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.google.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, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org When the %data argument is not modified, we can declare it const. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20250210133134.90879-8-philmd@linaro.org> --- hw/sd/sdhci-internal.h | 2 +- hw/sd/sdhci.c | 2 +- hw/sensor/emc141x.c | 2 +- hw/sensor/isl_pmbus_vr.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/sd/sdhci-internal.h b/hw/sd/sdhci-internal.h index 5f3765f12d2..9f768c418e0 100644 --- a/hw/sd/sdhci-internal.h +++ b/hw/sd/sdhci-internal.h @@ -322,6 +322,6 @@ void sdhci_initfn(SDHCIState *s); void sdhci_uninitfn(SDHCIState *s); void sdhci_common_realize(SDHCIState *s, Error **errp); void sdhci_common_unrealize(SDHCIState *s); -void sdhci_common_class_init(ObjectClass *klass, void *data); +void sdhci_common_class_init(ObjectClass *klass, const void *data); #endif diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index 99dd4a4e952..1f45a77566c 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -1542,7 +1542,7 @@ const VMStateDescription sdhci_vmstate = { }, }; -void sdhci_common_class_init(ObjectClass *klass, void *data) +void sdhci_common_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc = DEVICE_CLASS(klass); diff --git a/hw/sensor/emc141x.c b/hw/sensor/emc141x.c index aeccd2a3c94..33c1bd330fd 100644 --- a/hw/sensor/emc141x.c +++ b/hw/sensor/emc141x.c @@ -265,7 +265,7 @@ static void emc141x_initfn(Object *obj) emc141x_set_temperature, NULL, NULL); } -static void emc141x_class_init(ObjectClass *klass, void *data) +static void emc141x_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc = DEVICE_CLASS(klass); I2CSlaveClass *k = I2C_SLAVE_CLASS(klass); diff --git a/hw/sensor/isl_pmbus_vr.c b/hw/sensor/isl_pmbus_vr.c index 304a66ea8b0..c60282cfe77 100644 --- a/hw/sensor/isl_pmbus_vr.c +++ b/hw/sensor/isl_pmbus_vr.c @@ -233,7 +233,7 @@ static void raa228000_init(Object *obj) isl_pmbus_vr_add_props(obj, flags, 1); } -static void isl_pmbus_vr_class_init(ObjectClass *klass, void *data, +static void isl_pmbus_vr_class_init(ObjectClass *klass, const void *data, uint8_t pages) { PMBusDeviceClass *k = PMBUS_DEVICE_CLASS(klass);