From nobody Tue Dec 24 02:45:09 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=1734597297; cv=none; d=zohomail.com; s=zohoarc; b=lJ3Y6Enj5GmaytRa6zT8+wd6dZ7Vt0HF3vUF5reBoxXwf03KIdG03dHkbldApvJBi2iaWpD1a6DOOC1U+yk+BRR0/1OMkAK0yhCn90Io0MlcuAGqyqtwk+Ov2mxokfaMv2Uf1aDEVICk+PO4d2EwCITWSB7esPjRZykGuIWKSUE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734597297; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=TlMQQm7DVIpgs/ZW+QzOnHXM5DBlsDVAt9yoOQUCT5w=; b=Laji5MIK+owOsE30WGuvXvFIaKBudj0GXeKbmobT1aJqk4AzRztip/vZ7jDB5GdVVLXlyQyGOE/+/KBCZU4rHCEr2ag+GEEEqLGKtqCxIGdsml/aVATIgLmHJRrKzaU3gwwHZCY/3y8Xpv6dXgOajF8wv9bcJ7WSSxW6ODo/L7E= 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 1734597297845507.06568892945234; Thu, 19 Dec 2024 00:34:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOBy2-0004ZP-Tr; Thu, 19 Dec 2024 03:33:10 -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 1tOBy1-0004Z7-Jh for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:09 -0500 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 1tOBy0-00058e-1T for qemu-devel@nongnu.org; Thu, 19 Dec 2024 03:33:09 -0500 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-136-eYdVgMtlMmu7JOATeaDLKw-1; Thu, 19 Dec 2024 03:33:04 -0500 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-385dcae001fso230821f8f.1 for ; Thu, 19 Dec 2024 00:33:04 -0800 (PST) Received: from [192.168.10.47] ([151.81.118.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8ac97fsm962448f8f.92.2024.12.19.00.33.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 00:33:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734597187; 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=TlMQQm7DVIpgs/ZW+QzOnHXM5DBlsDVAt9yoOQUCT5w=; b=F3oXNTD9ZQ/sgMJ8GbC3cAAtqUwYNJBpZmy/OFO65/oRKVJmmLhEOsNqjjZzjkVE+UeM0r DbckksghalKy3zUwFO7bvCyTOWXtfSnaIrqz0Hw4gFhNVtqbASwECvG502U+jx/JnOgEsG z3XSao53rsovxC/2fqRlV1bbST5rr14= X-MC-Unique: eYdVgMtlMmu7JOATeaDLKw-1 X-Mimecast-MFC-AGG-ID: eYdVgMtlMmu7JOATeaDLKw X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734597182; x=1735201982; 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=TlMQQm7DVIpgs/ZW+QzOnHXM5DBlsDVAt9yoOQUCT5w=; b=vhweHV2r1TGG698Vqy4777GGRTddmxU2OaUVqTi98ytst/XKq3fqZEswYx1bnxXoGx 7KWcX+7IKTi7wLUQwIdTtNbENec7vHi3OFufEXX+3j3Ok8Cb/vxOQC3ZuZZZXaomjMUR ImSi0xn9whnmojfeY3kst7p2raqQCYwW4pfgGgr9On2hYz3hAelNLhotor3cP5Xf9Oy2 ZBS4MzRWaBTq32WXKlxTshj/gCC6kKREAYYdRmvlDQAWBJ+PvlfYHWZOcfbBymUSLtwU gBKX6iwIWQSllvUgs9FNTvn9rkZNtQI4ksCpcsbbH585CLLzxIEy7Jbm8McIoLC/Ohy4 lv7g== X-Gm-Message-State: AOJu0Yy9gSdtmxpgKaEuZn83XmicXZ1AAxTiZoziwYSOc7o2N3lsqKmU GPGYup7PFp2/QOAVdkP/jveyd4PW7svf6Qbx8sI058zpyiQO5jtW+EnL0oLu3X8niPSwigQZuf+ 0Q1OCvl0pQ3sN9SmNQ/a+O0dFxJvW1FqBB4twWUTM9FZ9RA2vu6QA6SR5oohr2uUdHUpspwsEbE XOsCJWEvtyc/tH/Ov6aCnWg7xPC3fzS4Di0e7b X-Gm-Gg: ASbGncuyNgvZbmHnse69puVeCU5BLox9ALk/8t3YguEwOxjDgXLPrNhvTUV3nKBmyrD Wq4d0SyhnxQQtfyfQG70M+nFAeGu73cchLiiQbIY9fl/QqYVqusKlqU8mUTOaqpBHrsHFGaSILO EdN2SGuiBEjUytXad4Cv9NpXKa0TbVa+eYnU+i6IGfpqsTc1UsjodQr4GYS2DkrtiPW7ouKCHIq vcYJAPuWu/BWHLcMJmUb+6iV5IRbtznTxQUB8u+73pNwoD4sLq0YtQV3mHS X-Received: by 2002:a05:6000:400f:b0:385:fa2e:a33e with SMTP id ffacd0b85a97d-388e4d8e54cmr6063772f8f.43.1734597182184; Thu, 19 Dec 2024 00:33:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IHKjGpwbAYyzTyApgi/Hc//OmdMRx57jNbb8c2W3s8J/3ePLHgS5d9ooc/n2BgOKe9BwhyFVw== X-Received: by 2002:a05:6000:400f:b0:385:fa2e:a33e with SMTP id ffacd0b85a97d-388e4d8e54cmr6063737f8f.43.1734597181722; Thu, 19 Dec 2024 00:33:01 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 16/41] hw/arm/armsse: Use device_class_set_props_n Date: Thu, 19 Dec 2024 09:32:03 +0100 Message-ID: <20241219083228.363430-17-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 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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1734597299282116600 Content-Type: text/plain; charset="utf-8" From: Richard Henderson We must remove DEFINE_PROP_END_OF_LIST so the count is correct. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-17-richard.henderson= @linaro.org Signed-off-by: Paolo Bonzini --- hw/arm/armsse.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/arm/armsse.c b/hw/arm/armsse.c index 1cd6b4a4b2b..ffd732f8068 100644 --- a/hw/arm/armsse.c +++ b/hw/arm/armsse.c @@ -72,6 +72,7 @@ struct ARMSSEInfo { bool has_cpu_pwrctrl; bool has_sse_counter; bool has_tcms; + uint8_t props_count; const Property *props; const ARMSSEDeviceInfo *devinfo; const bool *irq_is_common; @@ -87,7 +88,6 @@ static const Property iotkit_properties[] =3D { DEFINE_PROP_BOOL("CPU0_DSP", ARMSSE, cpu_dsp[0], true), DEFINE_PROP_UINT32("CPU0_MPU_NS", ARMSSE, cpu_mpu_ns[0], 8), DEFINE_PROP_UINT32("CPU0_MPU_S", ARMSSE, cpu_mpu_s[0], 8), - DEFINE_PROP_END_OF_LIST() }; =20 static const Property sse200_properties[] =3D { @@ -104,7 +104,6 @@ static const Property sse200_properties[] =3D { DEFINE_PROP_UINT32("CPU0_MPU_S", ARMSSE, cpu_mpu_s[0], 8), DEFINE_PROP_UINT32("CPU1_MPU_NS", ARMSSE, cpu_mpu_ns[1], 8), DEFINE_PROP_UINT32("CPU1_MPU_S", ARMSSE, cpu_mpu_s[1], 8), - DEFINE_PROP_END_OF_LIST() }; =20 static const Property sse300_properties[] =3D { @@ -117,7 +116,6 @@ static const Property sse300_properties[] =3D { DEFINE_PROP_BOOL("CPU0_DSP", ARMSSE, cpu_dsp[0], true), DEFINE_PROP_UINT32("CPU0_MPU_NS", ARMSSE, cpu_mpu_ns[0], 8), DEFINE_PROP_UINT32("CPU0_MPU_S", ARMSSE, cpu_mpu_s[0], 8), - DEFINE_PROP_END_OF_LIST() }; =20 static const ARMSSEDeviceInfo iotkit_devices[] =3D { @@ -528,6 +526,7 @@ static const ARMSSEInfo armsse_variants[] =3D { .has_sse_counter =3D false, .has_tcms =3D false, .props =3D iotkit_properties, + .props_count =3D ARRAY_SIZE(iotkit_properties), .devinfo =3D iotkit_devices, .irq_is_common =3D sse200_irq_is_common, }, @@ -549,6 +548,7 @@ static const ARMSSEInfo armsse_variants[] =3D { .has_sse_counter =3D false, .has_tcms =3D false, .props =3D sse200_properties, + .props_count =3D ARRAY_SIZE(sse200_properties), .devinfo =3D sse200_devices, .irq_is_common =3D sse200_irq_is_common, }, @@ -570,6 +570,7 @@ static const ARMSSEInfo armsse_variants[] =3D { .has_sse_counter =3D true, .has_tcms =3D true, .props =3D sse300_properties, + .props_count =3D ARRAY_SIZE(sse300_properties), .devinfo =3D sse300_devices, .irq_is_common =3D sse300_irq_is_common, }, @@ -1699,7 +1700,7 @@ static void armsse_class_init(ObjectClass *klass, voi= d *data) =20 dc->realize =3D armsse_realize; dc->vmsd =3D &armsse_vmstate; - device_class_set_props(dc, info->props); + device_class_set_props_n(dc, info->props, info->props_count); device_class_set_legacy_reset(dc, armsse_reset); iic->check =3D armsse_idau_check; asc->info =3D info; --=20 2.47.1