From patchwork Thu Aug 10 08:39:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Vetrini X-Patchwork-Id: 13349036 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 069B6C04FDF for ; Thu, 10 Aug 2023 08:40:24 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.581924.911400 (Exim 4.92) (envelope-from ) id 1qU1DI-0005Yp-Fn; Thu, 10 Aug 2023 08:40:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 581924.911400; Thu, 10 Aug 2023 08:40:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qU1DI-0005XO-BK; Thu, 10 Aug 2023 08:40:12 +0000 Received: by outflank-mailman (input) for mailman id 581924; Thu, 10 Aug 2023 08:40:11 +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 1qU1DH-0005MW-AQ for xen-devel@lists.xenproject.org; Thu, 10 Aug 2023 08:40:11 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 844667fe-3759-11ee-b283-6b7b168915f2; Thu, 10 Aug 2023 10:40:10 +0200 (CEST) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id B79434EE0743; Thu, 10 Aug 2023 10:40:09 +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: 844667fe-3759-11ee-b283-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 , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Wei Liu Subject: [XEN PATCH v2 3/7] xen/include: make a declaration of 'get_sec' visible where needed Date: Thu, 10 Aug 2023 10:39:43 +0200 Message-Id: <37fed394315c24e7b7419e564696a534886f0d53.1691655814.git.nicola.vetrini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 A declaration for 'get_sec' is added in 'xen/include/xen/time.h' to be available for every call site (in particular 'cper.h'). This also resolves a violation of MISRA C:2012 Rule 8.4. Signed-off-by: Nicola Vetrini Fixes: c8cb30cfc87a ("mce: Provide ERST interface") Reviewed-by: Jan Beulich --- Changes in v2: - Revised commit message - Split patch --- xen/include/xen/cper.h | 3 +-- xen/include/xen/time.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/include/xen/cper.h b/xen/include/xen/cper.h index 7c6a4c45ce32..de8f385bdd5c 100644 --- a/xen/include/xen/cper.h +++ b/xen/include/xen/cper.h @@ -23,8 +23,7 @@ #include #include - -extern unsigned long get_sec(void); +#include typedef struct { uint8_t b[16]; diff --git a/xen/include/xen/time.h b/xen/include/xen/time.h index 5aafdda4f392..67c586b7369c 100644 --- a/xen/include/xen/time.h +++ b/xen/include/xen/time.h @@ -36,6 +36,7 @@ s_time_t get_s_time_fixed(u64 at_tick); s_time_t get_s_time(void); unsigned long get_localtime(struct domain *d); uint64_t get_localtime_us(struct domain *d); +unsigned long get_sec(void); struct tm { int tm_sec; /* seconds */