Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp506545pxb; Wed, 18 Aug 2021 07:23:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz82pe6EUduQ2nE5Ni7lHURKYWoDZIxzQIhWEBevsxeYdYaa4oWMoCg/t+j3wiU70Hs5F27 X-Received: by 2002:a92:cc86:: with SMTP id x6mr6586772ilo.119.1629296614194; Wed, 18 Aug 2021 07:23:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629296614; cv=none; d=google.com; s=arc-20160816; b=RDZqtReACYT6/HJUS95VMZnBz+tUWC/f1acRVMJL0Nv8ACHY8ftl8SIxaOAtjzQ/FZ Sjq1OD9fq3GOd7zATKpKt8yfhaYH/pS1n3jGT7svdZLoaKhfs9WrAO7ELkWoVaEzjAG+ u5vWbkJW7nlay3zk6lbKt+/9/KpbWY+Db84RZb46cqTdDKnEr+wlRBRYln1lAq92dbUF UnfcA1MQTHFJ4+33zE5FYnWGDGv+XkWB4+vxgzy7bik4ucN7IQzk1sgGmQNCnqwnYdIh pJHJnoR8UAu3ZHwjC5KEVNyyrY3fMv2W+Tdj7B6FhpvIX7HCVyVR4NH/I7yOgi3lIPtQ 8W3A== 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; bh=XRJcay04c4+HGP8hA0k71ugb0TyE1umxocLGpm5yt80=; b=Xv+1mlRK9S4CjzoEshIiKBibJO1eg81YBT1IV3X3GkUL1nOjZSVcd5dCTqvt+28l1b D7CouRKHR4ij/+XUl0Fi1/Uffosgj/GzF9AlnAovm0/BWONdOIVBqgT+WbDHY6QuYRCA EIGUs1E6Ou18feVbsjZVBMjBq+AKybiEMUQofwWe+i0/UaOo4D5FxDGrGaW7wxKj0bcU RLZwLzpRmk5Nz1ERpUYfPSzzC0vWH/dXUSSOTIlxAfqEjgDqEmM5PPvgVzOoS79S1qK/ dx/EUmrfYkOC76vCY3Z5pDVBqZ4Cq4NWolIZ2FyWi/HTyhMSC6I0YM97Qie/ZxKwiC04 5TDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=iVm0ncHo; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s14si5535960jar.33.2021.08.18.07.23.22; Wed, 18 Aug 2021 07:23:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=iVm0ncHo; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239637AbhHROXe (ORCPT + 99 others); Wed, 18 Aug 2021 10:23:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239554AbhHROXY (ORCPT ); Wed, 18 Aug 2021 10:23:24 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D628FC06122F; Wed, 18 Aug 2021 07:19:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=XRJcay04c4+HGP8hA0k71ugb0TyE1umxocLGpm5yt80=; b=iVm0ncHopjP/X9nEmDSlzFnERU JKbD0lCGfy7zwAjuiKHB3s5gAxtodQVEZDAjn+Gfn/4dm2VXdzxQhP8PWZ8Zoe4ReKH21Zv6sH1bW QmEvKCjp501xWmFSz51Bi1HpWBxQScfahXr/7jACyvcd5MpImceC7PByna31Z7Vh19bZGqJvXhnt2 xKBMfyWNHJ30rXvh0R9pZfwvfBa/Mzq2K/EVeiHRYbLWyrJpz8s15qSJdsGGh45/sZb+u/bJZ+/NG nkE/R1+VDD3bafiXiyn8PuW9kcnC7Tspn9v0MszsilEv545lvAJKyijYWBr8jaArsDB3DHCMMe2P1 mcmP3XxQ==; Received: from [2001:4bb8:188:1b1:5a9e:9f39:5a86:b20c] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mGMOU-003uwG-4s; Wed, 18 Aug 2021 14:18:32 +0000 From: Christoph Hellwig To: Gabriel Krisman Bertazi Cc: Shreeya Patel , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: [PATCH 08/11] unicode: move utf8cursor to utf8-selftest.c Date: Wed, 18 Aug 2021 16:06:48 +0200 Message-Id: <20210818140651.17181-9-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210818140651.17181-1-hch@lst.de> References: <20210818140651.17181-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Only used by the tests, so no need to keep it in the core. Signed-off-by: Christoph Hellwig --- fs/unicode/utf8-norm.c | 16 ---------------- fs/unicode/utf8-selftest.c | 6 ++++++ fs/unicode/utf8n.h | 2 -- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/fs/unicode/utf8-norm.c b/fs/unicode/utf8-norm.c index 348d6e97553f..1ac90fa00070 100644 --- a/fs/unicode/utf8-norm.c +++ b/fs/unicode/utf8-norm.c @@ -456,22 +456,6 @@ int utf8ncursor(struct utf8cursor *u8c, const struct utf8data *data, } EXPORT_SYMBOL(utf8ncursor); -/* - * Set up an utf8cursor for use by utf8byte(). - * - * u8c : pointer to cursor. - * data : const struct utf8data to use for normalization. - * s : NUL-terminated string. - * - * Returns -1 on error, 0 on success. - */ -int utf8cursor(struct utf8cursor *u8c, const struct utf8data *data, - const char *s) -{ - return utf8ncursor(u8c, data, s, (unsigned int)-1); -} -EXPORT_SYMBOL(utf8cursor); - /* * Get one byte from the normalized form of the string described by u8c. * diff --git a/fs/unicode/utf8-selftest.c b/fs/unicode/utf8-selftest.c index 80fb7c75acb2..04628b50351d 100644 --- a/fs/unicode/utf8-selftest.c +++ b/fs/unicode/utf8-selftest.c @@ -165,6 +165,12 @@ static ssize_t utf8len(const struct utf8data *data, const char *s) return utf8nlen(data, s, (size_t)-1); } +static int utf8cursor(struct utf8cursor *u8c, const struct utf8data *data, + const char *s) +{ + return utf8ncursor(u8c, data, s, (unsigned int)-1); +} + static void check_utf8_nfdi(void) { int i; diff --git a/fs/unicode/utf8n.h b/fs/unicode/utf8n.h index 41182e5464df..736b6460a38c 100644 --- a/fs/unicode/utf8n.h +++ b/fs/unicode/utf8n.h @@ -65,8 +65,6 @@ struct utf8cursor { * Returns 0 on success. * Returns -1 on failure. */ -extern int utf8cursor(struct utf8cursor *u8c, const struct utf8data *data, - const char *s); extern int utf8ncursor(struct utf8cursor *u8c, const struct utf8data *data, const char *s, size_t len); -- 2.30.2