Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp695952imi; Fri, 22 Jul 2022 07:31:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v/F3L58MbYwv+XEPhpqqp0nDyP/9f0/uLAZOplyLSmJNNObzTT8+kvNCwFK1B3T2ODX0ne X-Received: by 2002:a05:6870:e303:b0:10d:6dde:237d with SMTP id z3-20020a056870e30300b0010d6dde237dmr7782857oad.263.1658500309604; Fri, 22 Jul 2022 07:31:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658500309; cv=none; d=google.com; s=arc-20160816; b=Q2MfSmwBJZrDL3G06FcEkjoK2CKwokNz1qTVsyLLMvoOcRZo+pr5eWg/4XkhjdMtWu zkEBGsZzcNnAvwrTccNKqnHz+lTBTWoV6RQCkVHML1mbiYZ7reSn6wcn/PXRHgLmCuoW NhKkGcMS/gl7gvQICfGqtTaX9UQ/6ZBkdXRclxjxBOp9QagJbj0cV32LyyzXBqaBlcNT /4erNW99BUzcAEVDKclwsfAFooEH01s2wLze/qJrS34Yp0ZpvlP4/vAGIza5i4ka06xs OLwWWyI9GX5m0rjdARniYvIQq8/pBEIWX8e/fM9LdSBlcoYjIa/y+OHXVBY1qC6hDf8t g8Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=BHMEwcfUl4Lipe1IIAYb3OZpbKINsuCE9J2iSQmhg8E=; b=VYVySSwnKBfhhQWXYiFcj3cD0oG1Sbg5R7N6G0At0tn4vO36pm7L/v8kMzxj354BcU czVBn1yyecKuhCY9oNWgxq5uYdt1tdZKClVhu44lWEq+1HjIetjsqaUdrwgrI8n7D7It ufqi9Qbq6tFJRotM6V23aXYfNQ1kTK2jePYShK2gXRDxLNJBj2VBEzn00yKVxA/94j7p UtVZefRFAf6zIFITWZ20V4gugOcPjgKqDltibBpEcMfYzTf91bE7YsVQ9YfrVQFdX14N P3jqk5aicp6maX8kMCf9JNHBTwnVcNn0MBZ50fi2gTIu2O8ax3nzICzQuXCVYPggFaJj ACTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=P+8cIkKU; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b20-20020a056830311400b0061cbf0877fbsi5441127ots.340.2022.07.22.07.31.34; Fri, 22 Jul 2022 07:31:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=P+8cIkKU; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235435AbiGVO3f (ORCPT + 99 others); Fri, 22 Jul 2022 10:29:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235007AbiGVO3Z (ORCPT ); Fri, 22 Jul 2022 10:29:25 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B64F09DCA1; Fri, 22 Jul 2022 07:29:24 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 5B99C20589; Fri, 22 Jul 2022 14:29:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1658500161; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BHMEwcfUl4Lipe1IIAYb3OZpbKINsuCE9J2iSQmhg8E=; b=P+8cIkKUhR6V14iPqBFOurkU2FPsYox6WtEncrj4BBbwSlfgFl/Hzv6rp3bQPNpytKILqx owWgMVBa+CsvnIGrO+fRSAqfuoK+yR3GjcInfGU7U1m1gsCjZ3iBUAp4PnJszw1SF+/6dc Qjoe7fdAgQVSciu3hQN48FR15qoq84U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1658500161; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BHMEwcfUl4Lipe1IIAYb3OZpbKINsuCE9J2iSQmhg8E=; b=Q0bk5e9E29j1XLCcdIdGPz0xh0q6tOe321S4iXPJtlbAH1wXEChWraRV6iBa66aaomzUKy 5NRUb0PCUs1OfjDw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 2B743134A9; Fri, 22 Jul 2022 14:29:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id CCHhCUG02mJ7bwAAMHmgww (envelope-from ); Fri, 22 Jul 2022 14:29:21 +0000 From: Takashi Iwai To: linux-fsdevel@vger.kernel.org Cc: Namjae Jeon , Sungjong Seo , 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 Message-Id: <20220722142916.29435-3-tiwai@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220722142916.29435-1-tiwai@suse.de> References: <20220722142916.29435-1-tiwai@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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