[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 2/4] xen/console: promote conring{,_size} to __ro_after_init
- To: xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: dmukhin@xxxxxxxx
- Date: Fri, 8 May 2026 17:57:12 -0700
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 205.220.161.53) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=ford.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ford.com; dkim=pass (signature was verified) header.d=saarlouis.ford.com; dkim=pass (signature was verified) header.d=ford.com; arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9CuhYlSXaFfyQQaLy3X2h44EEpfOSp6LjenvqrTCogI=; b=n1qSkcv5aCA2Fhe0ciHBbdE2J7qHRITwbalNFcw1AKZf1X1f5wKumD2S4OfqU2AnNyuDO1DuSKZngTiMSJqG/Ttn264ojt7hCvbj6gHRYn5JuF0V2PtUvBXR4yslHv8No+TqvzgNzP7dn1VvMtVh+ObdfMBt/KcMwP9TOpwDhKFVRD6v9mKmTeTKdetFEbdwaOeW1Xnd6u/rxahwmPvj2QJFe9lJDpaKWR/qdhC/EM3mGqodIX/FJxTbZ/ETqTDRbeHGUhUGEddb9HvpeWNgnBhvlbY8Y0jsM3sHofvuPL2JKmmkUeJVDIUzd/mdqZWJk0n/IqCz111wh840BKzcjw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PTvCNv6ruVTyRk5xdaGXigKUlBR43GaqpMxhguNMNB5L4/F7EvsmNMkzc1pOSnxuZNAloD2Q0+cUr967IUnnPeNh9nC7eTE15OLY0DZ5kZRfheuEWghkzUtxEaGzjnEOv7oHWVD0ciKKVWJhdyCJc2WU5dufXMgDaEpk2hOYWZJQdSR5ugMbArXvw4Jw/6ORSc3bNnsq2Toqq4oEyIyAh6LYNEU2zP6ulvH6vyj7DNHfd58paadqkLLvXj0ckwDMaT2XMoFKhPSid6cZUwDwxDRxP1hgMqb9R6foqx54SkWbjvZos6jwLDvLTf6Y+XfZzRzjxZSNuxzey5WRX2X3bw==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=ppford header.d=ford.com header.i="@ford.com" header.h="Cc:Content-Transfer-Encoding:Content-Type:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"; dkim=pass header.s=selector2-azureford-onmicrosoft-com header.d=azureford.onmicrosoft.com header.i="@azureford.onmicrosoft.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=ppserprodsaar header.d=saarlouis.ford.com header.i="@saarlouis.ford.com" header.h="Cc:Content-Transfer-Encoding:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"; dkim=pass header.s=ppfserpocford header.d=ford.com header.i="@ford.com" header.h="Cc:Content-Transfer-Encoding:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"
- Cc: andrew.cooper3@xxxxxxxxxx, anthony.perard@xxxxxxxxxx, jbeulich@xxxxxxxx, julien@xxxxxxx, michal.orzel@xxxxxxx, roger.pau@xxxxxxxxxx, sstabellini@xxxxxxxxxx, dmukhin@xxxxxxxx
- Delivery-date: Sat, 09 May 2026 00:57:53 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Pser-m365-app: SER-APP
From: Denis Mukhin <dmukhin@xxxxxxxx>
Both conring{,_size} should be RO after initialization is completed.
Change the conring integer parameters type to `unsigned int` as required
by CODING_STYLE.
Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Denis Mukhin <dmukhin@xxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
Changes since v5:
- used `unsigned int`
- added Jan's A-b
---
xen/drivers/char/console.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index 522b2f489a53..5ab3b0de12d8 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -340,15 +340,15 @@ static void cf_check do_dec_thresh(unsigned char key,
bool unused)
*/
/* conring_size: override build-time CONFIG_CONRING_SHIFT setting. */
-static uint32_t __initdata opt_conring_size;
+static unsigned int __initdata opt_conring_size;
size_param("conring_size", opt_conring_size);
#define _CONRING_SIZE (1U << CONFIG_CONRING_SHIFT)
#define CONRING_IDX_MASK(i) ((i) & (conring_size - 1))
static char __initdata _conring[_CONRING_SIZE];
-static char *__read_mostly conring = _conring;
-static uint32_t __read_mostly conring_size = _CONRING_SIZE;
-static uint32_t conringc, conringp;
+static char *__ro_after_init conring = _conring;
+static unsigned int __ro_after_init conring_size = _CONRING_SIZE;
+static unsigned int conringc, conringp;
static void cf_check conring_notify(void *unused)
{
--
2.54.0
|