Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp510292imn; Tue, 26 Jul 2022 01:49:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vjVCcHSy4wSK5ps+PD1ra1ZkSlKRI2i3Leev02nRLrEkrkd3A25A4BmD2+aBdN4NRT2tQi X-Received: by 2002:a17:906:cc5d:b0:72b:1313:cd09 with SMTP id mm29-20020a170906cc5d00b0072b1313cd09mr12978900ejb.482.1658825357655; Tue, 26 Jul 2022 01:49:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658825357; cv=none; d=google.com; s=arc-20160816; b=ASF107fKd3kp8ycj/9qT6DnqgiMdiq11YLgWnbPa8wkvYQsmPYeCSBjThKA202b78M v1Hpnt4zMHBuoKBES8OxDiXGSQZ0mn4fZ9QukyuROwc/UhV4XswxZ+JiA04AiHJIWuu4 W1/7LXHvCFSAake+Q0h00t/3AbZv2B56uenSSbOVrBfasykcd3BEf7E7ighPvk38xEJY vN5x8g948icWt3VnlV9ubLpvOcyHuld50idyJ5UqZIGqAdCo4vB/a5K08a3BBFYiTx8W udGVRilP8xGFf5t7Hvi8HyGPqnN0wsblyoxS7BkmNmCHAqYJrkDn2domEhiM3gcRQVWV LkeQ== 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=h7anLCQCvfEImdQ3rav9hS9LwqBH1cP+khrPsehktI0=; b=uGh9en0kXJGVfjC0+Krfc5yAIE+YygDpuZLfnzqsHC6/ev+cWe/Wlx2avafZoKiX+A IU9+aZzrkoonq2WZSE3K9IhRKK4f4rpJxbhDqRSQfCYk1nVXYEx9ke94JqTtKjPgDnZg NLJbvVmtgPmrAjSy7lSHJrmciblj3+hI4vChS/aOdsZ6ssMpy2NjbLvra+GawqLYRuBL 03qK1UeXwNMUkt5k8y592aV3cT5Xea4xMDwjPtmvynSJjMN+EwgWcCmT3A6Z/+Jlf6FN IeAkB3qciYRif69V9iFwQAtuJttmPGoR1cJ/mV3bF/MN7Qw/gzdODP7VPsVE576BUbIg tK4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=coTDEuxm; dkim=neutral (no key) header.i=@suse.de header.b=eD+HSjvt; 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 ek17-20020a056402371100b0043bd872f30csi7347753edb.560.2022.07.26.01.48.52; Tue, 26 Jul 2022 01:49:17 -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=coTDEuxm; dkim=neutral (no key) header.i=@suse.de header.b=eD+HSjvt; 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 S238625AbiGZIjl (ORCPT + 99 others); Tue, 26 Jul 2022 04:39:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232342AbiGZIje (ORCPT ); Tue, 26 Jul 2022 04:39:34 -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 63F832F65B; Tue, 26 Jul 2022 01:39:33 -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 1A09D1FA7D; Tue, 26 Jul 2022 08:39:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1658824772; 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=h7anLCQCvfEImdQ3rav9hS9LwqBH1cP+khrPsehktI0=; b=coTDEuxmww/n2W0eQV0iZwOQjiuYXNgrhTMsgSfLeJReyFKhbTyCt/hHyQZYEygPjDMEBi VBrDHmOAr1Md2GxoNjysW8xu57GwfhKW9lQR/PE5jMFIYg9z7rOt2lFGVtRyGrDvGPQhSV WhBrJkgP7pXN4LUpiAz11Xs3i/KaWNA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1658824772; 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=h7anLCQCvfEImdQ3rav9hS9LwqBH1cP+khrPsehktI0=; b=eD+HSjvtlrQJuxer+rSnBoLdpxDHTxDU1UUnH+j1en/SNmlVzeoF77uwafBj24upQPoeih TVefNtvXW3mqwuAQ== 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 E3D8F13A7C; Tue, 26 Jul 2022 08:39:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id qLf1NkOo32LYDQAAMHmgww (envelope-from ); Tue, 26 Jul 2022 08:39:31 +0000 From: Takashi Iwai To: linux-fsdevel@vger.kernel.org Cc: Namjae Jeon , Sungjong Seo , Petr Vorel , Joe Perches , linux-kernel@vger.kernel.org Subject: [PATCH v2 2/5] exfat: Define NLS_NAME_* as bit flags explicitly Date: Tue, 26 Jul 2022 10:39:26 +0200 Message-Id: <20220726083929.1684-3-tiwai@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220726083929.1684-1-tiwai@suse.de> References: <20220726083929.1684-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. Reviewed-by: Petr Vorel 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