Message ID | 37fed394315c24e7b7419e564696a534886f0d53.1691655814.git.nicola.vetrini@bugseng.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | fix missing headers and static storage duration | expand |
On 10.08.2023 10:39, Nicola Vetrini wrote: > 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 <nicola.vetrini@bugseng.com> > Fixes: c8cb30cfc87a ("mce: Provide ERST interface") Reviewed-by: Jan Beulich <jbeulich@suse.com>
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 <xen/types.h> #include <xen/string.h> - -extern unsigned long get_sec(void); +#include <xen/time.h> 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 */
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 <nicola.vetrini@bugseng.com> Fixes: c8cb30cfc87a ("mce: Provide ERST interface") --- 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(-)