From patchwork Mon Feb 10 13:31:29 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: 863764 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e42:0:b0:385:e875:8a9e with SMTP id r2csp1593469wrt; Mon, 10 Feb 2025 05:33:49 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVc+PijtkOApTPRWXzddYQIi//9nXGg+S6K2m7JTwpnbj1/5su/8dEGxCFw0qM/N/g+BUZ9Lg==@linaro.org X-Google-Smtp-Source: AGHT+IFiNdsM1uXnnW8WelaCYiNyMyTdK4gjbUMEQjMmm0BjHYQUa+j4YOsLxY+VetggPnJ0it2V X-Received: by 2002:a05:620a:1b93:b0:7c0:63fa:6cdf with SMTP id af79cd13be357-7c063fa6e6dmr183442485a.33.1739194428876; Mon, 10 Feb 2025 05:33:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1739194428; cv=none; d=google.com; s=arc-20240605; b=F/nxB056CKO3sg4LMc+Wg5LSUrqYDuY815yDy7C4zQEDZYSwWoKp6pFNZaOsnr/FLX BwlQayrIQvvQiSR6/3S/zo2LsSoJVxmS2ebEMnblGcebZMea6ZKuVVdvZIabinb3ot0C 8Xp6NECVBqbMS/1O48TSKQQDNEOF7KfyyJIHrIygB3BK8DGGUytRzB97rWGzB8awXJ2K 48yG0tqPvzbO46uIHOYuO3im8RFXkCIgUMtN5490+37IrFJTxfaah8ueif6H2SBR3AEB BJga7Uw6RtK5En/8KW+iWAFT9QkT2w5Wr91ih7gKoAhUcJ+Xmg/XLoPJe2pUePPHNoVx aKeQ== 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=tRDqbtanMlA5Asve4v+RadDNokWUtgjMp7wgM0p7V4g=; fh=fz3DJMUXEzejNv0JWYQ+xa02BmrDN+/I7HIv5ot61VY=; b=bEaBAg6Ycv0iYh866eOMJ+v2nVWGkhI0FY+1gu9EiX5pip5x5ahvgsBmf6VEGvE/eZ QibBO4QldbzVXMQezTjCV5TTscgJsuGGZExt9qjLRERl3M1tbR9r18weLLA9DMMhy/hY CKOcDRL9R4KEKjIUeQCqMYd9yWKWqb4rRrNSlqtA5ISvvAr0HJ52cavo3D9Drn9GhsgX OmZDbmkkEVxGF8d50+mAE0Z3rYdYW/2SvS/2lbGTeCzZMXoUqhxDOd8Adb9ihuRxwOgE mJ3qom1P2bLQO4n649Bw1jdIdOGMlPU6annm1cc88W0aHtZmVOkjVCjLQ6E74CAvrr0I wfJQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qhxDxgjv; 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-7c0504b6048si482290885a.405.2025.02.10.05.33.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Feb 2025 05:33:48 -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=qhxDxgjv; 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 1thTum-0000nV-5D; Mon, 10 Feb 2025 08:33:35 -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 1thTtS-0008OW-Nn for qemu-devel@nongnu.org; Mon, 10 Feb 2025 08:32:16 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1thTtP-0006AL-UJ for qemu-devel@nongnu.org; Mon, 10 Feb 2025 08:32:09 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-43946b5920cso4900475e9.1 for ; Mon, 10 Feb 2025 05:32:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739194326; x=1739799126; 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=tRDqbtanMlA5Asve4v+RadDNokWUtgjMp7wgM0p7V4g=; b=qhxDxgjvqblrHa7CRS/SgJ2Vd7oTFjEspKuvDAHduUNiZ/VWkn3wbMCwoCiL5GZLjl y9k5qxh3WdD+dR8Q8hFjxyBWLxJ9dZ0kIVwYGFfr7lDOlZM7HWKs32IkvxMr7uqSF08j TUvqJIaYgMRak0e9vR+n6NGWgn7IFV5pqX6iJZat2vx1LMa2sxIDLTxyLtpC3GUIut00 phAf/UJI4IKjeSRx6BlYm0L0+MQnsMEqK8yZ+xTEtkO3IPvvz+Vq75WJ0jdywbWZZlTq WZ4mAWgFRvhBJkjPHcmbozyqylcYaIw2jzqAB0vlVHGymUnmN2Wwg9irhq0S6m7vxfDY uUBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739194326; x=1739799126; 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=tRDqbtanMlA5Asve4v+RadDNokWUtgjMp7wgM0p7V4g=; b=oVnjvJfiDULQKsQ5KZHZmyNhCR4BT4Nr4p36P1ejDrBFCr4KWDxXzznmxCRcp3XG7T 5NDn4+NUTDrqqegANbKOdiLK6SGTrvHfP4bjJQg+e3yiwcKkJUPEwriZP9qZlfrwwOOn DYuxYo7iCGk1A1c16BIxfWF6ugpD9gjjb1Ou+Zd7V75H9nbuPbXKgFW9KxjpcYn8hNZ2 ODk+9ogosWs7OIK1kRJMeCOyjpCYfj9F/uJxyIVfMEMce7ZSSGfOZm4SxEjxxPqreOzP 2NXNMYVHQllLOr5d7gZ67QSZ50Tx6YwZn5Q3x4WtHy1rkSBMCDzKk4gPyA02+pwWDYoy RJVw== X-Gm-Message-State: AOJu0Yxn4yx0aMwU/Nm9CtMCNpLJuNA5aG89n3vVnR7s2s/CjgDwfJb/ +6MNkL7Q4ayKOCav7fL0m82KlKT5WB9Si1k1yZbq16JDBPZzCLD+WiF9716dww0lHtnrSDSKakJ D5bo= X-Gm-Gg: ASbGnctDD19oNMAWWt4guuysEIYjSyQO5qBFIqpIn5scoPoZSg4jv8oVoUgGAW75BTq 3+vw8jc252+HSHfnXtNCoqBGapyPeBA5NeJyNq1A/5EecOIELybnXnJfDLohaXaAoIb82Z1DO/N RjgwblZ1rdAH6iTf0sotPUYJ0IvJ7utcNPlLWdCj0xsSFF7li5s5YCYq4JIC7dwtKK77lbRHGHj H5UglIORqI/7NgjWeP8Xf70GNRwUpbpry1wBnYvTZ9vSXTB42QXKz6A/dosZSrkgo3dGJcNDMnR UuPGrbxEALkYeylPJ3NGIk1zYs23Ml7NMeZqJuKWoPxYghKT2m9EAohyH+o7LESr1WGlDAw= X-Received: by 2002:a05:600c:3849:b0:439:4a1f:cf8b with SMTP id 5b1f17b1804b1-4394a1fd551mr18132165e9.0.1739194325647; Mon, 10 Feb 2025 05:32:05 -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-4390d94dd1esm183301635e9.16.2025.02.10.05.32.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 10 Feb 2025 05:32:05 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PATCH v2 06/11] hw: Declare various const data as 'const' Date: Mon, 10 Feb 2025 14:31:29 +0100 Message-ID: <20250210133134.90879-7-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250210133134.90879-1-philmd@linaro.org> References: <20250210133134.90879-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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 --- 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;