mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
3f2e539359
commit
5916a22b83
10 changed files with 20 additions and 19 deletions
|
@ -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);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue