mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
don't bother with explicit length argument for __lookup_constant()
Have the arrays of constant_table self-terminated (by NULL ->name in the final entry). Simplifies lookup_constant() and allows to reuse the search for enum params as well. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
5eede62529
commit
34264ae3fa
3 changed files with 21 additions and 18 deletions
|
@ -83,9 +83,7 @@ extern int fs_lookup_param(struct fs_context *fc,
|
|||
bool want_bdev,
|
||||
struct path *_path);
|
||||
|
||||
extern int __lookup_constant(const struct constant_table tbl[], size_t tbl_size,
|
||||
const char *name, int not_found);
|
||||
#define lookup_constant(t, n, nf) __lookup_constant(t, ARRAY_SIZE(t), (n), (nf))
|
||||
extern int lookup_constant(const struct constant_table tbl[], const char *name, int not_found);
|
||||
|
||||
#ifdef CONFIG_VALIDATE_FS_PARSER
|
||||
extern bool validate_constant_table(const struct constant_table *tbl, size_t tbl_size,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue