summaryrefslogtreecommitdiff
path: root/include/linux/fs_parser.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2019-12-16 13:45:41 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2020-02-07 14:47:52 -0500
commit34264ae3fa22429ec4fd9151602342d1f21486eb (patch)
tree687392b53b9d246d3ec1193abcade23ad85186b5 /include/linux/fs_parser.h
parent5eede625297f4d21dc12ea7a7418fd21672f131d (diff)
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>
Diffstat (limited to 'include/linux/fs_parser.h')
-rw-r--r--include/linux/fs_parser.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/linux/fs_parser.h b/include/linux/fs_parser.h
index 5c91a0ac4446..14bdaacf1218 100644
--- a/include/linux/fs_parser.h
+++ b/include/linux/fs_parser.h
@@ -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,