From patchwork Fri Dec 13 19:07:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 850286 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:2c4:b0:385:e875:8a9e with SMTP id o4csp1696283wry; Fri, 13 Dec 2024 11:37:53 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWnJrwOzx2MdDCfM5BMofhiokBccEXVTnrbzwzm7KOsbqRLxvOWx9/tbGVWBFBzUasLsU8gKQ==@linaro.org X-Google-Smtp-Source: AGHT+IFnG70B8+RUnjrV9PLz5Pg3ItKROBB+rnDfs+JRuVtLn8iDIOJ1tIYb1CUh5rv4GFUko2fu X-Received: by 2002:a05:6214:124d:b0:6d8:9d28:ff07 with SMTP id 6a1803df08f44-6dc96853437mr67409766d6.45.1734118673165; Fri, 13 Dec 2024 11:37:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734118673; cv=none; d=google.com; s=arc-20240605; b=Jdls3ZuVX6o+sisfv0PSe7ZXhAo1bY/FH3txxPgoL2eyvO1R7TkX6U90WmYyr07gA5 xXKgBSMCoMdCJeA14RCQEw/tdWr3Xu9go3ZD6Pjbaj/97gtOdjmjQEgQxz6rtF5W64f6 jQqXFBTsFl3oGt3dEleQiAV7ACMX7XlyIZ2TmFK5bdMMfuiYQ1HqZlTAi+3JoDG3IsTS GprK3865TKW36R6Lc9UobKNPU7owCG8RXtgtCe78MbBc+ewbQXRaFUypC4GHKdMJSO3D XQofaNGG7JUBYEUrnBjXYwcRSvAaWVaPvGnD78oWKLwprrrhHiQN7ducdUVNkFIgmSzo w+fw== 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=6I71WCIZYeQ5yV8uCldLsOTnUpTDKGYy0sk8GaKQTI8=; fh=IDUlU6ypbuCr0Vie4XT+3fe5/NXXK5vJJBm15M8/nJo=; b=VdoXhCbz/egwsIS+Ov1z1Z6NwCypOUSOYrN2zCIAWpSghlfIaFY5SRQDlMINNOutQW 4L0K3U3NsUbjXGel8JozF4WkKwuL8NdDIDNAJxdgZ78OB5WQ67IQS6NDrkDU0OnGfbCM XVhaCMxzHL+VFtWssFDSO9/nNBTNZKfl/j70HoTGX57lwE+lomXZEZ81tu/V6XDUesYx 4FNoMpb+4ZU7mKVvlxLet9x1Xd8kSyyOgEEOKSrNwvSc3u4GG57TdHyWJST5ThRaBuY/ hnyh6+YMUd/jNTlR8P+SqzmCMVr3bMXSJZi7otltRXu413G2STMm/8toBB266elkmQiY frWQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Cp97yayD; 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 6a1803df08f44-6dccd39aa73si723696d6.452.2024.12.13.11.37.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Dec 2024 11:37:53 -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=Cp97yayD; 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 1tMB6m-0005sh-QH; Fri, 13 Dec 2024 14:13:52 -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 1tMB6k-0005fz-2F for qemu-devel@nongnu.org; Fri, 13 Dec 2024 14:13:50 -0500 Received: from mail-oi1-x22b.google.com ([2607:f8b0:4864:20::22b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tMB6h-0007Sy-IX for qemu-devel@nongnu.org; Fri, 13 Dec 2024 14:13:49 -0500 Received: by mail-oi1-x22b.google.com with SMTP id 5614622812f47-3eb7f3b1342so910410b6e.1 for ; Fri, 13 Dec 2024 11:13:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734117226; x=1734722026; 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=6I71WCIZYeQ5yV8uCldLsOTnUpTDKGYy0sk8GaKQTI8=; b=Cp97yayDM4zb9c9kRp16YDDMfoZLMRp6QXyG0Z2dgm+1SREITx+uUauiHPi2rNoby6 lRSc5RncSifJ2Au8JiHt1d5zotJYrCrXFIaaCa3sWeYlmgMwOGdpXaiNjteFQUx/Zv9h j4GojxcE4lPPsWVQDzVAQ2dei5OPWTE/vFPQQiQfqN6epy4btllB5+08/BePd48Dmmu2 xWON4gq45nEqfA3f5T0B8RwqWg6q1g5DInmnWw2WuBCfBAu45gooS79mW96t0JYJ1w7S JO9EX2IHXHYGnh76ymPl44/TOi4ZmvD+WjXojl0+mQozACSwjmS+eqFEw15TZwMGFK+b mxPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734117226; x=1734722026; 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=6I71WCIZYeQ5yV8uCldLsOTnUpTDKGYy0sk8GaKQTI8=; b=H7bm7jtoU48FqrZwCKw23bm87+RZEEBNC1HLxaEYpnU2gmjt8OWoXmlpMpmpxLH9Vm FunbFxK+y+1D7fl8Fia689YBihbuw2CXc5wN4LoX9LfdBe31Po50Fltw2IFVMbVkRaFW PKbdaAuz1efHIRaXzzh1+3l0q2nxB9Ea4UwGYYzkBfLdQ1hXcQ4CdafsmG7LJ4Snranr JlRyJg3byyhfgFJYe/3bLK6+k6lYpwJRScm/7O/fpC/U+UvumFRxv3a7k/ODG8SoXLye UIwHBJU+jKgTKeznJqSakkdCBU/2eZp21s+f2SP+yh0zFQxiebNbtstJnzy4Z+pXnOwA Sb2A== X-Gm-Message-State: AOJu0YyiaiCnT6xnIDwtG4P2XAzMgWT2uHsmhcrrJfn+7g+LjzFWBkYg fUUEb+Agrc5SeChwnfD8XknCw3mD+xpXk0sjoJUxxP0CX3equ/RGwPRyhnwMUmGIO9WjXZdp3pn P4oRfK8yt X-Gm-Gg: ASbGnctgPrXcBlHkQagXzzDqXzm+TJ2St2DKu6+dMm9u0xAXFaV8OLT+Z8SuZ0Wwl+Z 62BPxHbRP3kKo92ClGVVjizZ5yAha9d2f9y7M5eEWXnSiv82O5xDiE8DlnSWBNf1qHMKFyBh1hl mhHZezGks7W7c931D5JXV6CYwCuQfW5By1/+9C9lyD/9eZg2Y/H7jgFzgcwNoZDbPq4T3sKv2uf sIvo/R2tw2+R71Qs5CDwlRO2Sj8vhHVZ4np1A5YbwOq6rEGYI/CifFpm+esT7XW X-Received: by 2002:a05:6808:2208:b0:3eb:4b4c:80d8 with SMTP id 5614622812f47-3eba65ba0admr1866208b6e.0.1734117226116; Fri, 13 Dec 2024 11:13:46 -0800 (PST) Received: from stoup.. ([187.217.227.247]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3ebb478a497sm3545b6e.10.2024.12.13.11.13.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2024 11:13:45 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Alistair Francis , "Edgar E. Iglesias" , Peter Maydell , qemu-arm@nongnu.org (open list:Xilinx ZynqMP and...) Subject: [PATCH 39/71] hw/misc/xlnx-versal-trng: Constify trng_props Date: Fri, 13 Dec 2024 13:07:13 -0600 Message-ID: <20241213190750.2513964-44-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241213190750.2513964-1-richard.henderson@linaro.org> References: <20241213190750.2513964-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::22b; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x22b.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 Use DEFINE_PROP_UNSIGNED instead of DEFINE_PROP_UINT64 so that we can set the PropertyInfo during initialization, instead of updating within trng_class_init. Signed-off-by: Richard Henderson --- hw/misc/xlnx-versal-trng.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/misc/xlnx-versal-trng.c b/hw/misc/xlnx-versal-trng.c index 86905479b8..2f6af4f680 100644 --- a/hw/misc/xlnx-versal-trng.c +++ b/hw/misc/xlnx-versal-trng.c @@ -660,8 +660,9 @@ static const PropertyInfo trng_prop_fault_events = { static PropertyInfo trng_prop_uint64; /* to extend qdev_prop_uint64 */ -static Property trng_props[] = { - DEFINE_PROP_UINT64("forced-prng", XlnxVersalTRng, forced_prng_seed, 0), +static const Property trng_props[] = { + DEFINE_PROP_UNSIGNED("forced-prng", XlnxVersalTRng, forced_prng_seed, + 0, trng_prop_uint64, uint64_t), DEFINE_PROP_UINT32("hw-version", XlnxVersalTRng, hw_version, 0x0200), DEFINE_PROP("fips-fault-events", XlnxVersalTRng, forced_faults, trng_prop_fault_events, uint32_t), @@ -694,7 +695,6 @@ static void trng_class_init(ObjectClass *klass, void *data) /* Clone uint64 property with set allowed after realized */ trng_prop_uint64 = qdev_prop_uint64; trng_prop_uint64.realized_set_allowed = true; - trng_props[0].info = &trng_prop_uint64; device_class_set_props(dc, trng_props); }