From patchwork Mon Dec 26 14:25:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 36640 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp939647wrt; Mon, 26 Dec 2022 06:33:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXuBGJwLPwNmuwM5NJXdXrVGbI6vGsa0WfWrRTEieuGXtkOzEg6+UEyU5ymDkAY8lu9PJFrD X-Received: by 2002:a17:906:1655:b0:7b5:73aa:9984 with SMTP id n21-20020a170906165500b007b573aa9984mr14314551ejd.14.1672065191513; Mon, 26 Dec 2022 06:33:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672065191; cv=none; d=google.com; s=arc-20160816; b=bob2hLjCUPRptHTv4UvFwm0aYTi+usJ0PhX02FM2pFeKulaC/4qD57qPMFnYLTsmp4 sY0CDbqQRkvgHkg95Gr3OePpm1PHdk97MO8myTAHnhwZZAb5JnvY0Lqk6BDVWXTKsTDR Zr2ebKbAwYi/Ji7bvCmLgiNiG7ZlOOfbQx2sfBgR4azFoQy0S6S9aFagxHCApbwco/BQ e5KCY7wtdvOg6mgbVZb9pupOG1U/XZRkwKMk+fObAASMSW0iSBATspuylFWipNHRtl7p oS1yv/F3mg16eESWSyY2sw2r0H7Cu7Ituc0lK4thvLBT9jGbiIlceocdq/S0rXOEsQT6 2QDA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=egSVArPxsGeI3y7j1gSrBONrLbQq/NFPEQornb/J6is=; b=jn+/2T40QLQvKAnCVPJ8bE+Ti7LmJAo0CTuT1/3I1kUjIb/e/sWkxYY2GYfiTRfrpk rgdXVO3YjCO6iSX/0e8fVYqytpum0+ww83rlbWapeUfOtGhEl0Iqkr+M2/sZaPjqO1/9 6L32hauVJxSLfUGyam7GKDQTT7eNU3LZ0PhhbHVzyxac0AYvNjFptO21AjZeYtp8l5UK Li8gckrEm5s/HuWf7JRGMylXs3dapOhsXk4GBlDydTRQJSUnvhrJSVCeGs6YZB2qcs5A rLYAWDeJ279hpgo5BQnh9IY3+12STvoByPg8GSmGU81sPdRM3crl4vGXUbFB246ZOrB+ Q3iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kDhmHC8y; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hb7-20020a170907160700b0078dbd939dacsi8827998ejc.545.2022.12.26.06.32.46; Mon, 26 Dec 2022 06:33:11 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=kDhmHC8y; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232037AbiLZO3K (ORCPT + 99 others); Mon, 26 Dec 2022 09:29:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232042AbiLZO2r (ORCPT ); Mon, 26 Dec 2022 09:28:47 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC0FA2604 for ; Mon, 26 Dec 2022 06:25:48 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 138CBB80CB0 for ; Mon, 26 Dec 2022 14:25:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93A19C433D2; Mon, 26 Dec 2022 14:25:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672064736; bh=BhRFMETNlXTsYiPgfUz62y1WvJ6pI3PsWrIYNgOgGx4=; h=From:To:Cc:Subject:Date:From; b=kDhmHC8y6+6MFtpFn/p4pt8qEJ6hp2MEH9Oxo8RCz1rnJapNuKc0w5zEm1IVlvQwY 7kcVb6IfseLklZI+VzRErl+7lZUg/iwjspTcbCnxdP1geJPh+OvnpOckK+u4wW/8nL a8Z68fnKdxKBqI/60984R9eZw3CGs0Uq4rG+4J1C3oQqgaNXtTbLeFgUTAVTDYvVGy +2B/E0lI6/SJLBzJ5DxYe8rAPxbB5MudIc6+9xLXH3qMeIsadbe144m2DKC1NWoa15 1IYtBUnAbCCvzReU8aFWQPsBxFmyjGgbl7s1IXdwhXU0aijBdy59Ca+WzXdN9lW2P7 cNS27d8MDbSYw== Received: by pali.im (Postfix) id F24D99D7; Mon, 26 Dec 2022 15:25:33 +0100 (CET) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: OGAWA Hirofumi Cc: linux-kernel@vger.kernel.org Subject: [PATCH] fat: Fix return value of vfat_bad_char() and vfat_replace_char() functions Date: Mon, 26 Dec 2022 15:25:12 +0100 Message-Id: <20221226142512.13848-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753287430685218830?= X-GMAIL-MSGID: =?utf-8?q?1753287430685218830?= These functions returns boolean value not wide character. Signed-off-by: Pali Rohár Acked-by: OGAWA Hirofumi --- fs/fat/namei_vfat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c index 21620054e1c4..0735e4f0aeed 100644 --- a/fs/fat/namei_vfat.c +++ b/fs/fat/namei_vfat.c @@ -200,7 +200,7 @@ static const struct dentry_operations vfat_dentry_ops = { /* Characters that are undesirable in an MS-DOS file name */ -static inline wchar_t vfat_bad_char(wchar_t w) +static inline bool vfat_bad_char(wchar_t w) { return (w < 0x0020) || (w == '*') || (w == '?') || (w == '<') || (w == '>') @@ -208,7 +208,7 @@ static inline wchar_t vfat_bad_char(wchar_t w) || (w == '\\'); } -static inline wchar_t vfat_replace_char(wchar_t w) +static inline bool vfat_replace_char(wchar_t w) { return (w == '[') || (w == ']') || (w == ';') || (w == ',') || (w == '+') || (w == '=');