Skip to content

Commit

Permalink
fold struct fs_parameter_enum into struct constant_table
Browse files Browse the repository at this point in the history
no real difference now

Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Feb 7, 2020
1 parent 2710c95 commit 5eede62
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion fs/afs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ enum afs_param {
Opt_source,
};

static const struct fs_parameter_enum afs_param_flock[] = {
static const struct constant_table afs_param_flock[] = {
{"local", afs_flock_mode_local },
{"openafs", afs_flock_mode_openafs },
{"strict", afs_flock_mode_strict },
Expand Down
2 changes: 1 addition & 1 deletion fs/ceph/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ enum ceph_recover_session_mode {
ceph_recover_session_clean
};

static const struct fs_parameter_enum ceph_param_recover[] = {
static const struct constant_table ceph_param_recover[] = {
{ "no", ceph_recover_session_no },
{ "clean", ceph_recover_session_clean },
{}
Expand Down
4 changes: 2 additions & 2 deletions fs/fs_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ int fs_parse(struct fs_context *fc,
struct fs_parse_result *result)
{
const struct fs_parameter_spec *p;
const struct fs_parameter_enum *e;
const struct constant_table *e;
int ret = -ENOPARAM, b;

result->negated = false;
Expand Down Expand Up @@ -380,7 +380,7 @@ bool fs_validate_description(const struct fs_parameter_description *desc)
name, param->name, t);
good = false;
} else if (t == fs_param_is_enum) {
const struct fs_parameter_enum *e = param->data;
const struct constant_table *e = param->data;
if (!e || !e->name) {
pr_err("VALIDATE %s: PARAM[%s] enum with no values\n",
name, param->name);
Expand Down
6 changes: 3 additions & 3 deletions fs/gfs2/ops_fstype.c
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,7 @@ enum opt_quota {
Opt_quota_on,
};

static const struct fs_parameter_enum gfs2_param_quota[] = {
static const struct constant_table gfs2_param_quota[] = {
{"off", Opt_quota_off },
{"account", Opt_quota_account },
{"on", Opt_quota_on },
Expand All @@ -1289,7 +1289,7 @@ enum opt_data {
Opt_data_ordered = GFS2_DATA_ORDERED,
};

static const struct fs_parameter_enum gfs2_param_data[] = {
static const struct constant_table gfs2_param_data[] = {
{"writeback", Opt_data_writeback },
{"ordered", Opt_data_ordered },
{}
Expand All @@ -1300,7 +1300,7 @@ enum opt_errors {
Opt_errors_panic = GFS2_ERRORS_PANIC,
};

static const struct fs_parameter_enum gfs2_param_errors[] = {
static const struct constant_table gfs2_param_errors[] = {
{"withdraw", Opt_errors_withdraw },
{"panic", Opt_errors_panic },
{}
Expand Down
2 changes: 1 addition & 1 deletion fs/jffs2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ enum {
Opt_rp_size,
};

static const struct fs_parameter_enum jffs2_param_compr[] = {
static const struct constant_table jffs2_param_compr[] = {
{"none", JFFS2_COMPR_MODE_NONE },
#ifdef CONFIG_JFFS2_LZO
{"lzo", JFFS2_COMPR_MODE_FORCELZO },
Expand Down
4 changes: 2 additions & 2 deletions fs/nfs/fs_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ enum {
Opt_local_lock_posix,
};

static const struct fs_parameter_enum nfs_param_enums_local_lock[] = {
static const struct constant_table nfs_param_enums_local_lock[] = {
{ "all", Opt_local_lock_all },
{ "flock", Opt_local_lock_flock },
{ "none", Opt_local_lock_none },
Expand All @@ -103,7 +103,7 @@ enum {
Opt_lookupcache_positive,
};

static const struct fs_parameter_enum nfs_param_enums_lookupcache[] = {
static const struct constant_table nfs_param_enums_lookupcache[] = {
{ "all", Opt_lookupcache_all },
{ "none", Opt_lookupcache_none },
{ "pos", Opt_lookupcache_positive },
Expand Down
5 changes: 0 additions & 5 deletions include/linux/fs_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ struct fs_parameter_spec {
const void *data;
};

struct fs_parameter_enum {
const char *name;
u8 value;
};

struct fs_parameter_description {
const char name[16]; /* Name for logging purposes */
const struct fs_parameter_spec *specs; /* List of param specifications */
Expand Down
2 changes: 1 addition & 1 deletion mm/shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -3381,7 +3381,7 @@ enum shmem_param {
Opt_uid,
};

static const struct fs_parameter_enum shmem_param_enums_huge[] = {
static const struct constant_table shmem_param_enums_huge[] = {
{"never", SHMEM_HUGE_NEVER },
{"always", SHMEM_HUGE_ALWAYS },
{"within_size", SHMEM_HUGE_WITHIN_SIZE },
Expand Down

0 comments on commit 5eede62

Please sign in to comment.