fs_parse: fold fs_parameter_desc/fs_parameter_spec

The former contains nothing but a pointer to an array of the latter...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2019-09-07 07:23:15 -04:00
parent 96cafb9ccb
commit d7167b1499
29 changed files with 106 additions and 198 deletions

View file

@ -56,10 +56,6 @@ struct fs_parameter_spec {
const void *data;
};
struct fs_parameter_description {
const struct fs_parameter_spec *specs; /* List of param specifications */
};
/*
* Result of parse.
*/
@ -74,12 +70,12 @@ struct fs_parse_result {
};
extern int __fs_parse(struct p_log *log,
const struct fs_parameter_description *desc,
const struct fs_parameter_spec *desc,
struct fs_parameter *value,
struct fs_parse_result *result);
static inline int fs_parse(struct fs_context *fc,
const struct fs_parameter_description *desc,
const struct fs_parameter_spec *desc,
struct fs_parameter *param,
struct fs_parse_result *result)
{
@ -97,13 +93,13 @@ extern int lookup_constant(const struct constant_table tbl[], const char *name,
extern bool validate_constant_table(const struct constant_table *tbl, size_t tbl_size,
int low, int high, int special);
extern bool fs_validate_description(const char *name,
const struct fs_parameter_description *desc);
const struct fs_parameter_spec *desc);
#else
static inline bool validate_constant_table(const struct constant_table *tbl, size_t tbl_size,
int low, int high, int special)
{ return true; }
static inline bool fs_validate_description(const char *name,
const struct fs_parameter_description *desc)
const struct fs_parameter_spec *desc)
{ return true; }
#endif