From nobody Sat Feb 7 18:16:01 2026 Received: from mail.archlinux.org (mail.archlinux.org [95.216.189.61]) (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 77CE22EC0A6 for ; Wed, 4 Feb 2026 04:08:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.216.189.61 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770178095; cv=none; b=LewdXnRIRJS/Sm/qSTtE2YMduafyo+f6T+jqfrKXVgcp2uKONY93nPzDjHFOhxLTfEyVgfOp4PiE5kkvAw1G4hA+XA9wpaTjDv7V7SRFEEhRhvHgMgvOTl8hKuHE7QiBGvc/cm1boB7VVa3JliwSaBPyXnPzM6csP2wGw2XPzJw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770178095; c=relaxed/simple; bh=D91DsTaSUPP+L0fQkbKpYSXi9uM9ADqa/zYaCjhljGo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=NL9X6TxwL3mjfXI5qlIh1S0u6iLX8Yg49tB/CILha84oUDuyA9HSae+NthgwX8qbaDP9mziadct4oBzD+GIPXLl9gj33I2DY43stG7XnPOjaoGqMgP0kvGW7wu5qdAHHQYTI8HspjsQm3LSIyYZ/QeYkQDgdKpw816jVS/FW3Pg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=archlinux.org; spf=pass smtp.mailfrom=archlinux.org; dkim=permerror (0-bit key) header.d=archlinux.org header.i=@archlinux.org header.b=MTK5vU1X; dkim=pass (4096-bit key) header.d=archlinux.org header.i=@archlinux.org header.b=S79RmwDD; arc=none smtp.client-ip=95.216.189.61 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=archlinux.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=archlinux.org Authentication-Results: smtp.subspace.kernel.org; dkim=permerror (0-bit key) header.d=archlinux.org header.i=@archlinux.org header.b="MTK5vU1X"; dkim=pass (4096-bit key) header.d=archlinux.org header.i=@archlinux.org header.b="S79RmwDD" From: George Hu DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-ed25519; t=1770177605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=jjqqsavJOjwUP3he0sE8oMzOHYhch8dg5h5smhrBp2g=; b=MTK5vU1X+yED8fNpoy60xpGHCWSB3AdNik4+3r2yhoF40TN5PTArB25Uc9uWGrWTHqFbhe XTdSttsNgKWvsCCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archlinux.org; s=dkim-rsa; t=1770177605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=jjqqsavJOjwUP3he0sE8oMzOHYhch8dg5h5smhrBp2g=; b=S79RmwDD2Cmt3+71IGXlgwQCjPD53xlwryqs3wGu98Mz7+mj8Ke13yXc8Gu4x6b4gLfhp2 cObksCgCTc+kzsXYlEmndhCe47/G4m5R/KLOlZTW4LWQASmN/vPtEd78L/YdcDmPQgs9ch s30szJiFNqb7GHH/gb132hCSiQwujqfph4Pofmki+OOJAATM6JBG7Q41FJET3MnH/uB41A Ae5VCTSabIYfI8NMfaDxmlAKZJvGeey2rPSxc+rQwbwaJoeeC0NAstmazxgWqc2aYUXDYi QcQdmxF+wGyiWtlXglrvSyMTT7Wu2+hISr8zuZYE0jtITj9COvbJbPUpDcBHp/Q+nFEFdW NyV7gJOWZdgh6U7lyPYW7+GAhQCm0eTyGNX711PV9uW8OZVIIBnkXf23F8SNlACamOU62K QM73ACVOkbwSpSQuYagbHsrVn1ttPlR4m/9V9ahqAEoJ9OrS6y7XJ6IYYCCRkg5Vmf5yuV BU9TUrA5HWJx8UgnzXYn+L0YBG06/eMFN56Zj20waEIMlKfs3OOcZfrl8KgaPz8/g5g4Al 8Ka23x7BlMOTbrXmeEJHNbq76kmFcq9Xq+SaMOVGjRzil/rauecs0mjXpOCh6zbJCjQ/ME FLXomheQ1hECqAkdawUUFYpiLrLGsmVNJnTD2oJ+vBzUKehPiBtFw= Authentication-Results: mail.archlinux.org; auth=pass smtp.auth=integral smtp.mailfrom=integral@archlinux.org To: OGAWA Hirofumi Cc: linux-kernel@vger.kernel.org, George Hu Subject: [PATCH] fat: remove unused fat_tolower() and use to_lower() instead Date: Wed, 4 Feb 2026 11:59:40 +0800 Message-ID: <20260204035940.133747-1-integral@archlinux.org> X-Mailer: git-send-email 2.52.0 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 Content-Type: text/plain; charset="utf-8" The fat_tolower() function is redundant, as it is functionally equivalent to the to_lower() macro defined in include/linux/ctype.h. Signed-off-by: George Hu --- fs/fat/dir.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/fs/fat/dir.c b/fs/fat/dir.c index 92b091783966..4f46d2358185 100644 --- a/fs/fat/dir.c +++ b/fs/fat/dir.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "fat.h" =20 /* @@ -33,11 +34,6 @@ #define FAT_MAX_UNI_CHARS ((MSDOS_SLOTS - 1) * 13 + 1) #define FAT_MAX_UNI_SIZE (FAT_MAX_UNI_CHARS * sizeof(wchar_t)) =20 -static inline unsigned char fat_tolower(unsigned char c) -{ - return ((c >=3D 'A') && (c <=3D 'Z')) ? c+32 : c; -} - static inline loff_t fat_make_i_pos(struct super_block *sb, struct buffer_head *bh, struct msdos_dir_entry *de) @@ -396,7 +392,7 @@ static int fat_parse_short(struct super_block *sb, de->lcase & CASE_LOWER_BASE); if (chl <=3D 1) { if (!isvfat) - ptname[i] =3D nocase ? c : fat_tolower(c); + ptname[i] =3D nocase ? c : tolower(c); i++; if (c !=3D ' ') { name_len =3D i; @@ -433,7 +429,7 @@ static int fat_parse_short(struct super_block *sb, if (chl <=3D 1) { k++; if (!isvfat) - ptname[i] =3D nocase ? c : fat_tolower(c); + ptname[i] =3D nocase ? c : tolower(c); i++; if (c !=3D ' ') { name_len =3D i; --=20 2.52.0