From 25ea3a3bdb63fee43f436194ba9740886a39177e Mon Sep 17 00:00:00 2001 From: Rich Ercolani Date: Mon, 9 Sep 2024 22:46:59 -0400 Subject: [PATCH] Bees bees bees Signed-off-by: Rich Ercolani --- include/os/linux/kernel/linux/simd.h | 4 ++-- module/zcommon/simd_stat.c | 13 ++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/include/os/linux/kernel/linux/simd.h b/include/os/linux/kernel/linux/simd.h index 6d8db150bb24..e7d7a4f2255e 100644 --- a/include/os/linux/kernel/linux/simd.h +++ b/include/os/linux/kernel/linux/simd.h @@ -46,7 +46,7 @@ #endif -extern void simd_stat_init(void); -extern void simd_stat_fini(void); +void simd_stat_init(void); +void simd_stat_fini(void); #endif /* _LINUX_SIMD_H */ diff --git a/module/zcommon/simd_stat.c b/module/zcommon/simd_stat.c index d77a3b6f220c..6ee664407a6e 100644 --- a/module/zcommon/simd_stat.c +++ b/module/zcommon/simd_stat.c @@ -6,13 +6,13 @@ #ifdef _KERNEL #ifdef __linux__ #include -#endif +#endif /* __linux__ */ kstat_t *simd_stat_kstat; -#endif +#endif /* _KERNEL */ +#ifdef _KERNEL #define SIMD_STAT_PRINT(s, feat, val) kmem_scnprintf(s + off, 4095 - off, "%-16s\t%1d\n", feat, (val)) -#ifdef _KERNEL static int simd_stat_kstat_data(char *buf, size_t size, void *data) { (void)data; @@ -65,17 +65,16 @@ simd_stat_kstat_data(char *buf, size_t size, void *data) { #if defined(__aarch64__) off += SIMD_STAT_PRINT(simd_stat_kstat_payload, "sha512", zfs_sha512_available()); #endif /* __aarch64__ */ +#endif /* __arm__ */ } -#endif /* __arm__ */ // we need one more for the trailing newline, or this prints grossly. off += 1; kmem_scnprintf(buf, MIN(off,size), "%s\n", simd_stat_kstat_payload); -#else #endif /* __linux__ */ return (0); } -#endif +#endif /* _KERNEL */ void simd_stat_init(void) @@ -99,7 +98,7 @@ simd_stat_init(void) NULL); kstat_install(simd_stat_kstat); } -#endif +#endif /* _KERNEL */ } /* Finish initialization */ simd_stat_initialized = B_TRUE;