Skip to content

Commit

Permalink
Bees bees bees
Browse files Browse the repository at this point in the history
Signed-off-by: Rich Ercolani <[email protected]>
  • Loading branch information
rincebrain committed Sep 10, 2024
1 parent 75203e5 commit 25ea3a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions include/os/linux/kernel/linux/simd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
13 changes: 6 additions & 7 deletions module/zcommon/simd_stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
#ifdef _KERNEL
#ifdef __linux__
#include <linux/simd.h>
#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))

Check failure on line 14 in module/zcommon/simd_stat.c

View workflow job for this annotation

GitHub Actions / checkstyle

line > 80 characters

Check failure on line 14 in module/zcommon/simd_stat.c

View workflow job for this annotation

GitHub Actions / checkstyle

#define followed by space instead of tab

#ifdef _KERNEL
static int
simd_stat_kstat_data(char *buf, size_t size, void *data) {

Check failure on line 17 in module/zcommon/simd_stat.c

View workflow job for this annotation

GitHub Actions / checkstyle

opening brace on same line as function header
(void)data;

Check failure on line 18 in module/zcommon/simd_stat.c

View workflow job for this annotation

GitHub Actions / checkstyle

indent by spaces instead of tabs

Check failure on line 18 in module/zcommon/simd_stat.c

View workflow job for this annotation

GitHub Actions / checkstyle

missing space after (void) cast

Check failure on line 18 in module/zcommon/simd_stat.c

View workflow job for this annotation

GitHub Actions / checkstyle

non-continuation indented 4 spaces
Expand Down Expand Up @@ -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)
Expand All @@ -99,7 +98,7 @@ simd_stat_init(void)
NULL);
kstat_install(simd_stat_kstat);
}
#endif
#endif /* _KERNEL */
}
/* Finish initialization */
simd_stat_initialized = B_TRUE;
Expand Down

0 comments on commit 25ea3a3

Please sign in to comment.