summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2020-02-03 13:52:41 -0500
committerGitHub <[email protected]>2020-02-03 10:52:41 -0800
commit07bc2bc2319655c0a9dd92f4a732467bfeac4874 (patch)
tree16801756be85a77cff7ac9b73d4626ac7e1ae2c7 /module
parentec213971274a38e9ad3558e12bd57d6a97f0acad (diff)
Fix const-correctness in raidz math
Clang warns (errors) that "cast from 'const void *' to 'struct v *' drops const qualifier." Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #9917
Diffstat (limited to 'module')
-rw-r--r--module/zfs/vdev_raidz_math_impl.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/module/zfs/vdev_raidz_math_impl.h b/module/zfs/vdev_raidz_math_impl.h
index ea592c0f1..89c2082c4 100644
--- a/module/zfs/vdev_raidz_math_impl.h
+++ b/module/zfs/vdev_raidz_math_impl.h
@@ -391,7 +391,7 @@ raidz_gen_pq_add(void **c, const void *dc, const size_t csize,
{
v_t *p = (v_t *)c[0];
v_t *q = (v_t *)c[1];
- const v_t *d = (v_t *)dc;
+ const v_t *d = (const v_t *)dc;
const v_t * const dend = d + (dsize / sizeof (v_t));
const v_t * const qend = q + (csize / sizeof (v_t));
@@ -462,7 +462,7 @@ raidz_gen_pqr_add(void **c, const void *dc, const size_t csize,
v_t *p = (v_t *)c[0];
v_t *q = (v_t *)c[1];
v_t *r = (v_t *)c[CODE_R];
- const v_t *d = (v_t *)dc;
+ const v_t *d = (const v_t *)dc;
const v_t * const dend = d + (dsize / sizeof (v_t));
const v_t * const qend = q + (csize / sizeof (v_t));
@@ -629,7 +629,7 @@ raidz_syn_q_abd(void **xc, const void *dc, const size_t xsize,
const size_t dsize)
{
v_t *x = (v_t *)xc[TARGET_X];
- const v_t *d = (v_t *)dc;
+ const v_t *d = (const v_t *)dc;
const v_t * const dend = d + (dsize / sizeof (v_t));
const v_t * const xend = x + (xsize / sizeof (v_t));
@@ -720,7 +720,7 @@ raidz_syn_r_abd(void **xc, const void *dc, const size_t tsize,
const size_t dsize)
{
v_t *x = (v_t *)xc[TARGET_X];
- const v_t *d = (v_t *)dc;
+ const v_t *d = (const v_t *)dc;
const v_t * const dend = d + (dsize / sizeof (v_t));
const v_t * const xend = x + (tsize / sizeof (v_t));
@@ -813,7 +813,7 @@ raidz_syn_pq_abd(void **tc, const void *dc, const size_t tsize,
{
v_t *x = (v_t *)tc[TARGET_X];
v_t *y = (v_t *)tc[TARGET_Y];
- const v_t *d = (v_t *)dc;
+ const v_t *d = (const v_t *)dc;
const v_t * const dend = d + (dsize / sizeof (v_t));
const v_t * const yend = y + (tsize / sizeof (v_t));
@@ -971,7 +971,7 @@ raidz_syn_pr_abd(void **c, const void *dc, const size_t tsize,
{
v_t *x = (v_t *)c[TARGET_X];
v_t *y = (v_t *)c[TARGET_Y];
- const v_t *d = (v_t *)dc;
+ const v_t *d = (const v_t *)dc;
const v_t * const dend = d + (dsize / sizeof (v_t));
const v_t * const yend = y + (tsize / sizeof (v_t));
@@ -1130,7 +1130,7 @@ raidz_syn_qr_abd(void **c, const void *dc, const size_t tsize,
v_t *x = (v_t *)c[TARGET_X];
v_t *y = (v_t *)c[TARGET_Y];
const v_t * const xend = x + (tsize / sizeof (v_t));
- const v_t *d = (v_t *)dc;
+ const v_t *d = (const v_t *)dc;
const v_t * const dend = d + (dsize / sizeof (v_t));
SYN_QR_DEFINE();
@@ -1295,7 +1295,7 @@ raidz_syn_pqr_abd(void **c, const void *dc, const size_t tsize,
v_t *y = (v_t *)c[TARGET_Y];
v_t *z = (v_t *)c[TARGET_Z];
const v_t * const yend = y + (tsize / sizeof (v_t));
- const v_t *d = (v_t *)dc;
+ const v_t *d = (const v_t *)dc;
const v_t * const dend = d + (dsize / sizeof (v_t));
SYN_PQR_DEFINE();