[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] console: make printk_ratelimit_{burst,ms} const
- To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jason Andryuk <jason.andryuk@xxxxxxx>
- Date: Tue, 5 Aug 2025 11:52:51 -0400
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=RUahBH58Kz0fNc27h/j5WSk2zjAIPnsRjrrcmBsfVAM=; b=pvVMf8DLC1Swc4NcR6dan7uSlYWdIAbnS1sICzsLPLeCJ6/Y/R5FbhFuKleHuOulZBEAlQzV7B0/4Z1fwDvnwwdev2GkiKDtMsozSI6koroF3XnzeLUCxSpAes5Md+B5XTr+kJ7SAX64BQ0RlBN9ZmEARwO8fVi8VeDoe9qML8oIWtKX+6jL7QckQNrhSV9Qn0cYnUrW4xkSCLOVEkVoyc9bWYguYBtz9DiyqlXWsB+KwvvZmOTiTvAWVjg+k/LaLuTa5Pg1fTSu1Js8/2Mt/4xZ65B7GO/YborleXE8z05q+eo/zCMcF9I2wYmit3L+jRALKftVuhVHSGncjMqZ8Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Zm82b/39gOzGp0RTPS+lH2VubtERniWI6QRT+Chjtb+5ffpiDPYPF7VBFuf0ro89qIyyz4AWlO8yIKXTqFMGb+uB+Ho7/3hEvl4F1n6UtU4kAluwiVToMmXw/blQdiltq5Qn5hd85PYgfkJRwag92FLWW1KyntTuTqTpSfiAZjWVRZI4Wu1mUL+JigvJVgEjDJd2fOLTz8rAN/vut8XEs3rDzAuCVtYziAd0pQJsOFhmMaGMDLeuHY7LjT4kQUWhsCfMFOGF9BFpIcVtbolnyY7bxyWa/lObM1bQ93JaKOiPiW7tkDUfIOUUfNRe7V1/Y+OfLGd2dJF0dfNC10S/Tw==
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Tue, 05 Aug 2025 15:53:07 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 2025-08-01 03:30, Jan Beulich wrote:
Them not being altered by any means, their __read_mostly attribute is
actually counter-productive: It causes the compiler to instantiate the
variables, when already with just the attributes dropped the compiler
can constant-propagate the values into the sole use site. Make the
situation yet more explicit by adding const.
Also switch the variables away from being plain int, and have the
parameters of __printk_ratelimit() follow suit. While there also
similarly adjust the type of "missed" and "lost", and - while touching
the adjacent line - increase lost_str[] to accommodate any unsigned
32-bit number.
Fixes: a8b1845a7845 ("Miscellaneous data placement adjustments")
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>
|