From patchwork Fri Aug 11 07:19:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Vetrini X-Patchwork-Id: 13350205 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 67FA4EB64DD for ; Fri, 11 Aug 2023 07:20:03 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.582279.911946 (Exim 4.92) (envelope-from ) id 1qUMR9-0003ic-Qj; Fri, 11 Aug 2023 07:19:55 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 582279.911946; Fri, 11 Aug 2023 07:19:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qUMR9-0003hx-L7; Fri, 11 Aug 2023 07:19:55 +0000 Received: by outflank-mailman (input) for mailman id 582279; Fri, 11 Aug 2023 07:19:53 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qUMR7-0003ey-Ot for xen-devel@lists.xenproject.org; Fri, 11 Aug 2023 07:19:53 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 77448417-3817-11ee-b284-6b7b168915f2; Fri, 11 Aug 2023 09:19:53 +0200 (CEST) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id 985C04EE0742; Fri, 11 Aug 2023 09:19:52 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 77448417-3817-11ee-b284-6b7b168915f2 From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, Nicola Vetrini Subject: [XEN PATCH 1/6] x86/hpet: make variable 'per_cpu__cpu_bc_channel' static Date: Fri, 11 Aug 2023 09:19:26 +0200 Message-Id: <5e13888db7b69cee21e5367ce8750fbdc1e22d5c.1691676251.git.nicola.vetrini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 The variable is only ever used inside the file where it's defined, therefore it can have static storage. This also resolves a violation of MISRA C:2012 Rule 8.4 due to the absence of a declaration prior to the definition. Signed-off-by: Nicola Vetrini Fixes: 3ba523ff957c ("CPUIDLE: enable MSI capable HPET for timer broadcast") Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/hpet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c index a2df1c7df401..79c07f6a9e09 100644 --- a/xen/arch/x86/hpet.c +++ b/xen/arch/x86/hpet.c @@ -49,7 +49,7 @@ static struct hpet_event_channel *__read_mostly hpet_events; /* msi hpet channels used for broadcast */ static unsigned int __read_mostly num_hpets_used; -DEFINE_PER_CPU(struct hpet_event_channel *, cpu_bc_channel); +static DEFINE_PER_CPU(struct hpet_event_channel *, cpu_bc_channel); unsigned long __initdata hpet_address; int8_t __initdata opt_hpet_legacy_replacement = -1;