From nobody Sun Feb 8 21:33:07 2026 Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF0AC256D for ; Thu, 28 Nov 2024 03:18:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.190 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732763917; cv=none; b=GTk4iUqBjQL4EXd+mveCOtOeJlOhkkDy3r72rEMwf5rXiSUkfR88jH8+dhvPsra/zHaabvSSpzLzw1rTG4VSfUcP6XYvfZ7XYivIENGlAyxv1dGc4C2Z+egpPe/EbiyoO7tQINE/W7xlsIP73LAEZ6WyPVYykDbuH5t0CTh2iBY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732763917; c=relaxed/simple; bh=TiR0Dn++jWa6gVEEWOieYWYgbH3PEeN5LZwzDJmLVb0=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Wj3d+vc9zy4QxubM0hf3vwCLItLwS33PiAoqW/UY5XZFt5WvCO2T6g6U7Uirhum4nLr2u72mxA1S89Aib4/mWED0DvbRyxWZ9SxxtXa9j8nl4uojeiA6m2PRZVegAihmjVsLdTOSebEijZA2zESNzHVKpjdPkZk2gbUb2afVhdM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.190 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.17]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4XzM0M6dPQz2Gbqc; Thu, 28 Nov 2024 11:16:19 +0800 (CST) Received: from kwepemf200016.china.huawei.com (unknown [7.202.181.9]) by mail.maildlp.com (Postfix) with ESMTPS id B77541A0188; Thu, 28 Nov 2024 11:18:28 +0800 (CST) Received: from huawei.com (10.113.213.244) by kwepemf200016.china.huawei.com (7.202.181.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 28 Nov 2024 11:18:28 +0800 From: Wang Jianjian To: OGAWA Hirofumi , CC: , Wang Jianjian Subject: [PATCH] fat: use nls_tolower simplify code Date: Thu, 28 Nov 2024 11:12:34 +0800 Message-ID: <20241128031234.3668274-1-wangjianjian3@huawei.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemf200016.china.huawei.com (7.202.181.9) Content-Type: text/plain; charset="utf-8" Signed-off-by: Wang Jianjian Acked-by: OGAWA Hirofumi --- fs/fat/dir.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/fat/dir.c b/fs/fat/dir.c index acbec5bdd521..88bf16204aab 100644 --- a/fs/fat/dir.c +++ b/fs/fat/dir.c @@ -214,10 +214,7 @@ fat_short2lower_uni(struct nls_table *t, unsigned char= *c, *uni =3D 0x003f; /* a question mark */ charlen =3D 1; } else if (charlen <=3D 1) { - unsigned char nc =3D t->charset2lower[*c]; - - if (!nc) - nc =3D *c; + unsigned char nc =3D nls_tolower(t, *c); =20 charlen =3D t->char2uni(&nc, 1, uni); if (charlen < 0) { --=20 2.34.1