diff options
author | Matthew Macy <[email protected]> | 2019-10-10 09:45:38 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-10-10 09:45:37 -0700 |
commit | c5858ff9462719be60b2ffb0065dd01508a63162 (patch) | |
tree | ea8dfb5c8f7298f5102c5422cfc3e6bb608d9373 /module/zfs/vdev_raidz_math_avx512f.c | |
parent | 381d91de7de42222419ea8fbe2a956f9aebe3f7a (diff) |
Make clang happy with vdev_raidz_ code
The macros are used to generate code for conditions without a
corresponding branch. This is not a problem in practice, but
clang has no way of knowing that. Add a default branch with a
VERIFY(0) to indicate that it "can't happen"
```
In file included from \
/usr/home/mmacy/devel/ZoF/module/zfs/vdev_raidz_math_sse2.c:607:
/usr/home/mmacy/devel/ZoF/module/zfs/vdev_raidz_math_impl.h:281:3: \
error: no case matching constant switch condition '3' [-Werror]
```
Reviewed-by: George Melikov <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Matt Macy <[email protected]>
Closes #9434
Diffstat (limited to 'module/zfs/vdev_raidz_math_avx512f.c')
-rw-r--r-- | module/zfs/vdev_raidz_math_avx512f.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/module/zfs/vdev_raidz_math_avx512f.c b/module/zfs/vdev_raidz_math_avx512f.c index adbe9b0ef..b89e18c0c 100644 --- a/module/zfs/vdev_raidz_math_avx512f.c +++ b/module/zfs/vdev_raidz_math_avx512f.c @@ -29,6 +29,7 @@ #include <sys/types.h> #include <sys/simd.h> +#include <sys/debug.h> #define __asm __asm__ __volatile__ @@ -194,6 +195,8 @@ typedef struct v { "vpternlogd $0x6c,%zmm29, %zmm26, %" VR0(r) "\n" \ "vpternlogd $0x6c,%zmm29, %zmm25, %" VR1(r)); \ break; \ + default: \ + VERIFY(0); \ } \ } @@ -370,6 +373,9 @@ gf_x2_mul_fns[256] = { COPY(R_23(r), _mul_x2_in); \ gf_x2_mul_fns[c](); \ COPY(_mul_x2_acc, R_23(r)); \ + break; \ + default: \ + VERIFY(0); \ } \ } |