diff options
author | Eric Biggers <ebiggers@google.com> | 2017-06-22 11:32:45 -0700 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2017-08-28 11:47:18 -0400 |
commit | 5916a22b83041b07d63191fe06206ae0fff6ec7a (patch) | |
tree | c1d154dcb136fe8e82e57e40f667557fc276c762 /include | |
parent | 3f2e539359bd0e709eb35127dc04df6bf8c3e8de (diff) | |
download | op-kernel-dev-5916a22b83041b07d63191fe06206ae0fff6ec7a.zip op-kernel-dev-5916a22b83041b07d63191fe06206ae0fff6ec7a.tar.gz |
dm: constify argument arrays
The arrays of 'struct dm_arg' are never modified by the device-mapper
core, so constify them so that they are placed in .rodata.
(Exception: the args array in dm-raid cannot be constified because it is
allocated on the stack and modified.)
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/device-mapper.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 4f2b3b2..3b5fdf3 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h @@ -387,7 +387,7 @@ struct dm_arg { * Validate the next argument, either returning it as *value or, if invalid, * returning -EINVAL and setting *error. */ -int dm_read_arg(struct dm_arg *arg, struct dm_arg_set *arg_set, +int dm_read_arg(const struct dm_arg *arg, struct dm_arg_set *arg_set, unsigned *value, char **error); /* @@ -395,7 +395,7 @@ int dm_read_arg(struct dm_arg *arg, struct dm_arg_set *arg_set, * arg->min and arg->max further arguments. Either return the size as * *num_args or, if invalid, return -EINVAL and set *error. */ -int dm_read_arg_group(struct dm_arg *arg, struct dm_arg_set *arg_set, +int dm_read_arg_group(const struct dm_arg *arg, struct dm_arg_set *arg_set, unsigned *num_args, char **error); /* |