diff mbox

[1/1,linux-next] fs/hfsplus/options.c: use standard option prefix

Message ID 1433533208-9880-1-git-send-email-fabf@skynet.be (mailing list archive)
State New, archived
Headers show

Commit Message

Fabian Frederick June 5, 2015, 7:40 p.m. UTC
All filesystems use Opt_ prefix for match_table_t enums

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 fs/hfsplus/options.c | 68 ++++++++++++++++++++++++++--------------------------
 1 file changed, 34 insertions(+), 34 deletions(-)

Comments

Richard Weinberger June 6, 2015, 1:31 p.m. UTC | #1
On Fri, Jun 5, 2015 at 9:40 PM, Fabian Frederick <fabf@skynet.be> wrote:
> All filesystems use Opt_ prefix for match_table_t enums

And needs hfsplus this patch?
It should not matter whether a filesystem is using opt_ or Opt_.
Fabian Frederick June 14, 2015, 9:21 a.m. UTC | #2
> On 06 June 2015 at 15:31 Richard Weinberger <richard.weinberger@gmail.com>
> wrote:
>
>
> On Fri, Jun 5, 2015 at 9:40 PM, Fabian Frederick <fabf@skynet.be> wrote:
> > All filesystems use Opt_ prefix for match_table_t enums
>
> And needs hfsplus this patch?
> It should not matter whether a filesystem is using opt_ or Opt_.
It's the only one using different prefix.
This can also lead to grep/stat issues.

Regards,
Fabian
>
> --
> Thanks,
> //richard
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Richard Weinberger June 14, 2015, 12:16 p.m. UTC | #3
Am 14.06.2015 um 11:21 schrieb Fabian Frederick:
> 
> 
>> On 06 June 2015 at 15:31 Richard Weinberger <richard.weinberger@gmail.com>
>> wrote:
>>
>>
>> On Fri, Jun 5, 2015 at 9:40 PM, Fabian Frederick <fabf@skynet.be> wrote:
>>> All filesystems use Opt_ prefix for match_table_t enums
>>
>> And needs hfsplus this patch?
>> It should not matter whether a filesystem is using opt_ or Opt_.
> It's the only one using different prefix.
> This can also lead to grep/stat issues.

That's right. Making code more grep friendly is a good thing.
This has to go into the commit message.

Thanks,
//richard
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/hfsplus/options.c b/fs/hfsplus/options.c
index c90b72e..d295ae6 100644
--- a/fs/hfsplus/options.c
+++ b/fs/hfsplus/options.c
@@ -19,29 +19,29 @@ 
 #include "hfsplus_fs.h"
 
 enum {
-	opt_creator, opt_type,
-	opt_umask, opt_uid, opt_gid,
-	opt_part, opt_session, opt_nls,
-	opt_nodecompose, opt_decompose,
-	opt_barrier, opt_nobarrier,
-	opt_force, opt_err
+	Opt_creator, Opt_type,
+	Opt_umask, Opt_uid, Opt_gid,
+	Opt_part, Opt_session, Opt_nls,
+	Opt_nodecompose, Opt_decompose,
+	Opt_barrier, Opt_nobarrier,
+	Opt_force, Opt_err
 };
 
 static const match_table_t tokens = {
-	{ opt_creator, "creator=%s" },
-	{ opt_type, "type=%s" },
-	{ opt_umask, "umask=%o" },
-	{ opt_uid, "uid=%u" },
-	{ opt_gid, "gid=%u" },
-	{ opt_part, "part=%u" },
-	{ opt_session, "session=%u" },
-	{ opt_nls, "nls=%s" },
-	{ opt_decompose, "decompose" },
-	{ opt_nodecompose, "nodecompose" },
-	{ opt_barrier, "barrier" },
-	{ opt_nobarrier, "nobarrier" },
-	{ opt_force, "force" },
-	{ opt_err, NULL }
+	{ Opt_creator, "creator=%s" },
+	{ Opt_type, "type=%s" },
+	{ Opt_umask, "umask=%o" },
+	{ Opt_uid, "uid=%u" },
+	{ Opt_gid, "gid=%u" },
+	{ Opt_part, "part=%u" },
+	{ Opt_session, "session=%u" },
+	{ Opt_nls, "nls=%s" },
+	{ Opt_decompose, "decompose" },
+	{ Opt_nodecompose, "nodecompose" },
+	{ Opt_barrier, "barrier" },
+	{ Opt_nobarrier, "nobarrier" },
+	{ Opt_force, "force" },
+	{ Opt_err, NULL }
 };
 
 /* Initialize an options object to reasonable defaults */
@@ -83,7 +83,7 @@  int hfsplus_parse_options_remount(char *input, int *force)
 
 		token = match_token(p, tokens, args);
 		switch (token) {
-		case opt_force:
+		case Opt_force:
 			*force = 1;
 			break;
 		default:
@@ -111,26 +111,26 @@  int hfsplus_parse_options(char *input, struct hfsplus_sb_info *sbi)
 
 		token = match_token(p, tokens, args);
 		switch (token) {
-		case opt_creator:
+		case Opt_creator:
 			if (match_fourchar(&args[0], &sbi->creator)) {
 				pr_err("creator requires a 4 character value\n");
 				return 0;
 			}
 			break;
-		case opt_type:
+		case Opt_type:
 			if (match_fourchar(&args[0], &sbi->type)) {
 				pr_err("type requires a 4 character value\n");
 				return 0;
 			}
 			break;
-		case opt_umask:
+		case Opt_umask:
 			if (match_octal(&args[0], &tmp)) {
 				pr_err("umask requires a value\n");
 				return 0;
 			}
 			sbi->umask = (umode_t)tmp;
 			break;
-		case opt_uid:
+		case Opt_uid:
 			if (match_int(&args[0], &tmp)) {
 				pr_err("uid requires an argument\n");
 				return 0;
@@ -141,7 +141,7 @@  int hfsplus_parse_options(char *input, struct hfsplus_sb_info *sbi)
 				return 0;
 			}
 			break;
-		case opt_gid:
+		case Opt_gid:
 			if (match_int(&args[0], &tmp)) {
 				pr_err("gid requires an argument\n");
 				return 0;
@@ -152,19 +152,19 @@  int hfsplus_parse_options(char *input, struct hfsplus_sb_info *sbi)
 				return 0;
 			}
 			break;
-		case opt_part:
+		case Opt_part:
 			if (match_int(&args[0], &sbi->part)) {
 				pr_err("part requires an argument\n");
 				return 0;
 			}
 			break;
-		case opt_session:
+		case Opt_session:
 			if (match_int(&args[0], &sbi->session)) {
 				pr_err("session requires an argument\n");
 				return 0;
 			}
 			break;
-		case opt_nls:
+		case Opt_nls:
 			if (sbi->nls) {
 				pr_err("unable to change nls mapping\n");
 				return 0;
@@ -180,19 +180,19 @@  int hfsplus_parse_options(char *input, struct hfsplus_sb_info *sbi)
 			}
 			kfree(p);
 			break;
-		case opt_decompose:
+		case Opt_decompose:
 			clear_bit(HFSPLUS_SB_NODECOMPOSE, &sbi->flags);
 			break;
-		case opt_nodecompose:
+		case Opt_nodecompose:
 			set_bit(HFSPLUS_SB_NODECOMPOSE, &sbi->flags);
 			break;
-		case opt_barrier:
+		case Opt_barrier:
 			clear_bit(HFSPLUS_SB_NOBARRIER, &sbi->flags);
 			break;
-		case opt_nobarrier:
+		case Opt_nobarrier:
 			set_bit(HFSPLUS_SB_NOBARRIER, &sbi->flags);
 			break;
-		case opt_force:
+		case Opt_force:
 			set_bit(HFSPLUS_SB_FORCE, &sbi->flags);
 			break;
 		default: