From: Takashi Iwai <tiwai@suse.de>
To: linux-fsdevel@vger.kernel.org
Cc: Namjae Jeon <linkinjeon@kernel.org>,
Sungjong Seo <sj1557.seo@samsung.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/4] exfat: Define NLS_NAME_* as bit flags explicitly
Date: Fri, 22 Jul 2022 16:29:14 +0200 [thread overview]
Message-ID: <20220722142916.29435-3-tiwai@suse.de> (raw)
In-Reply-To: <20220722142916.29435-1-tiwai@suse.de>
NLS_NAME_* are bit flags although they are currently defined as enum;
it's casually working so far (from 0 to 2), but it's error-prone and
may bring a problem when we want to add more flag.
This patch changes the definitions of NLS_NAME_* explicitly being bit
flags.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
fs/exfat/exfat_fs.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/exfat/exfat_fs.h b/fs/exfat/exfat_fs.h
index 4a7a2308eb72..f431327af459 100644
--- a/fs/exfat/exfat_fs.h
+++ b/fs/exfat/exfat_fs.h
@@ -27,9 +27,9 @@ enum exfat_error_mode {
* exfat nls lossy flag
*/
enum {
- NLS_NAME_NO_LOSSY, /* no lossy */
- NLS_NAME_LOSSY, /* just detected incorrect filename(s) */
- NLS_NAME_OVERLEN, /* the length is over than its limit */
+ NLS_NAME_NO_LOSSY = 0, /* no lossy */
+ NLS_NAME_LOSSY = 1 << 0, /* just detected incorrect filename(s) */
+ NLS_NAME_OVERLEN = 1 << 1, /* the length is over than its limit */
};
#define EXFAT_HASH_BITS 8
--
2.35.3
next prev parent reply other threads:[~2022-07-22 14:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-22 14:29 [PATCH 0/4] exfat: Fixes for ENAMETOOLONG error handling Takashi Iwai
2022-07-22 14:29 ` [PATCH 1/4] exfat: Return ENAMETOOLONG consistently for oversized paths Takashi Iwai
2022-07-22 14:29 ` Takashi Iwai [this message]
2022-07-22 14:29 ` [PATCH 3/4] exfat: Expand exfat_err() and co directly to pr_*() macro Takashi Iwai
2022-07-23 7:42 ` Joe Perches
2022-07-23 8:04 ` Takashi Iwai
2022-07-23 8:16 ` Joe Perches
2022-07-26 7:02 ` Namjae Jeon
2022-07-26 7:46 ` Takashi Iwai
2022-07-26 7:54 ` Namjae Jeon
2022-07-23 9:04 ` Petr Vorel
2022-07-22 14:29 ` [PATCH 4/4] exfat: Downgrade ENAMETOOLONG error message to debug messages Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220722142916.29435-3-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=linkinjeon@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sj1557.seo@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®