diff options
author | Tino Reichardt <[email protected]> | 2022-10-01 00:34:39 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2022-09-30 15:34:39 -0700 |
commit | a2d5643f88ceb7c5d30fa43cc683756d19cb3eb1 (patch) | |
tree | 1720f659c632c11305d6537843500f0a92fb8303 /module/zfs/vdev.c | |
parent | 55d7afa4adbb4ca569e9c4477a7d121f4dc0bfbd (diff) |
Fix double const qualifier declarations
Some header files define structures like this one:
typedef const struct zio_checksum_info {
/* ... */
const char *ci_name;
} zio_abd_checksum_func_t;
So we can use `zio_abd_checksum_func_t` for const declarations now.
It's not needed that we use the `const` qualifier again like this:
`const zio_abd_checksum_func_t *varname;`
This patch solves the double const qualifiers, which were found by
smatch.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Signed-off-by: Tino Reichardt <[email protected]>
Closes #13961
Diffstat (limited to 'module/zfs/vdev.c')
-rw-r--r-- | module/zfs/vdev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c index b097e0921..66cec052b 100644 --- a/module/zfs/vdev.c +++ b/module/zfs/vdev.c @@ -224,7 +224,7 @@ vdev_dbgmsg_print_tree(vdev_t *vd, int indent) * Virtual device management. */ -static const vdev_ops_t *const vdev_ops_table[] = { +static vdev_ops_t *const vdev_ops_table[] = { &vdev_root_ops, &vdev_raidz_ops, &vdev_draid_ops, @@ -246,7 +246,7 @@ static const vdev_ops_t *const vdev_ops_table[] = { static vdev_ops_t * vdev_getops(const char *type) { - const vdev_ops_t *ops, *const *opspp; + vdev_ops_t *ops, *const *opspp; for (opspp = vdev_ops_table; (ops = *opspp) != NULL; opspp++) if (strcmp(ops->vdev_op_type, type) == 0) |