From patchwork Sat May 15 10:18:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 12259595 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45373C43460 for ; Sat, 15 May 2021 10:19:53 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BC28B613F0 for ; Sat, 15 May 2021 10:19:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC28B613F0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DgVytqFjBuVcwQKGFL4Kyasoz451RwvwlrvkCBSqVBs=; b=kgckZxfcAqazHGB9BBA/kyMfB VpL/6yuF86w9Zfcks0zpn2W5OaJ3fzVBYhZoS3Nao+2idXieTy7v9FUanrKVii9R4Kb+DglQQjU56 1b9ytKZYNLqDIdlQYa+QyCfojUfL2yQdaKJby3/q1aAQjcnQpoP8kkT4P8VqhmafFFDRjh0feb3ZM wdvz4K1cQUkUX9AEvDxFBodOMYE+x6j90KJi7OkLnUHv6oFU2Zj5ZlT5sm0dyAKUPWSO7r6qB43fr YuMld+/uJiDLiTXmdo1oS7K4ynlpSO/xv++fhb4mFG2Fd1MstOK+Iyc8wFeCTMOZ7iwkm5DLta5zh WfzhRys0w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lhrOW-00A8lw-Rm; Sat, 15 May 2021 10:19:40 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhrOL-00A8g3-U2; Sat, 15 May 2021 10:19:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=9Fw1IFvYq/KjZTRKKWVzQNRcjazScUqC2uvuOnLwQW0=; b=Y+uvjse+1MvjzSJhMngSlDQ4KV kWrh2ud6kQ7RCMGXTCRDj6porqRUfY3+v0uf0csvvqMOEBDEpQ/gJT1cSolZMPj7wOrTK9ktKejbE PuxXHEj+Q/w2ZAH+gPLp/UMm0zeyDaXzYL1UjadCHfJBAmAAwNTDZYOr27Sq12KsE0ELXyHIfOcox pr0/xC/mZ1hLZ9Qo8O+4EpQK4ohZ0U+OdlccRLI2tHCBaNQ77FmIj7TuPUTc/O3MNYhRSQ0rPr6Lt 2ZZDrjRqGleoDY5F8X62SMgVE2xWwsfrkKNv0nJdgv7NjUo6YjT1My3bDYKzS2gS+8XG7yhach++3 hyKfDKWw==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhrOJ-00CU6B-A3; Sat, 15 May 2021 10:19:28 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id E949460C40; Sat, 15 May 2021 10:19:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621073967; bh=Lb/DGS9E/FUSMtSHAOCH5rcc8a7ucnqACx5B/SB9r64=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lp+IzcRjKvLR7R++grQxnLp5gtXP/qgN/cg/jcb91yHCafo9eiUfkQxObCDBCGovC TFKLGUohWA3fQwZPvPi3so4qDwe/nQwdVB/Zpg89Ei6NLVc98yHvm8h8zpxNkOXOzJ HqlnbG+AOzcfs7TiPxwHgCjBWg/sp1i9Mx+5NkeL/2X5g4YE7j9kLgiy41okPcWaDK GZ3hLjqev+EZ0yJmEGmLgCdC9w79agdGf9FvOnZDObtON4etwgfiPcWKWiAgelyks0 Gtn4EtMiZohOg//Wb49qpe1Brp+XFagahm8puDaxQjJ1NEBFDVrRK656cJmTzk6wAb 0ws3B/3Ao+LfA== From: Arnd Bergmann To: linux-arch@vger.kernel.org Cc: Arnd Bergmann , Christoph Hellwig , Al Viro , Vineet Gupta , Yoshinori Sato , Brian Cain , Geert Uytterhoeven , Paul Walmsley , Palmer Dabbelt , Albert Ou , Jeff Dike , Richard Weinberger , Anton Ivanov , Sid Manning , Andrew Morton , Mike Rapoport , linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, linux-hexagon@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-riscv@lists.infradead.org, linux-um@lists.infradead.org Subject: [PATCH 6/6] [v2] asm-generic: remove extra strn{cpy_from, len}_user declarations Date: Sat, 15 May 2021 12:18:03 +0200 Message-Id: <20210515101803.924427-7-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210515101803.924427-1-arnd@kernel.org> References: <20210515101803.924427-1-arnd@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210515_031927_392424_A939B3DB X-CRM114-Status: UNSURE ( 9.79 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann As these are now in asm-generic, it's no longer necessary to declare them in the architecture. Signed-off-by: Arnd Bergmann --- arch/arc/include/asm/uaccess.h | 5 ----- arch/hexagon/include/asm/uaccess.h | 6 ------ arch/um/include/asm/uaccess.h | 5 +---- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/arch/arc/include/asm/uaccess.h b/arch/arc/include/asm/uaccess.h index 754a23f26736..783bfdb3bfa3 100644 --- a/arch/arc/include/asm/uaccess.h +++ b/arch/arc/include/asm/uaccess.h @@ -667,11 +667,6 @@ extern unsigned long arc_clear_user_noinline(void __user *to, #define __clear_user(d, n) arc_clear_user_noinline(d, n) #endif -extern long strncpy_from_user(char *dst, const char __user *src, long count); -#define strncpy_from_user(d, s, n) strncpy_from_user(d, s, n) -extern long strnlen_user(const char __user *src, long n); -#define strnlen_user(s, n) strnlen_user(s, n) - #include #include diff --git a/arch/hexagon/include/asm/uaccess.h b/arch/hexagon/include/asm/uaccess.h index d950df12d8c5..ef5bfef8d490 100644 --- a/arch/hexagon/include/asm/uaccess.h +++ b/arch/hexagon/include/asm/uaccess.h @@ -57,12 +57,6 @@ unsigned long raw_copy_to_user(void __user *to, const void *from, __kernel_size_t __clear_user_hexagon(void __user *dest, unsigned long count); #define __clear_user(a, s) __clear_user_hexagon((a), (s)) -extern long strnlen_user(const char __user *src, long n); -#define strnlen_user strnlen_user - -extern long strncpy_from_user(char *dst, const char __user *src, long n) -#define strncpy_from_user strncpy_from_user - #include diff --git a/arch/um/include/asm/uaccess.h b/arch/um/include/asm/uaccess.h index 3bf209f683f8..191ef36dd543 100644 --- a/arch/um/include/asm/uaccess.h +++ b/arch/um/include/asm/uaccess.h @@ -23,16 +23,13 @@ extern unsigned long raw_copy_from_user(void *to, const void __user *from, unsigned long n); extern unsigned long raw_copy_to_user(void __user *to, const void *from, unsigned long n); -extern long strncpy_from_user(char *dst, const char __user *src, long count); -extern long strnlen_user(const void __user *str, long len); extern unsigned long __clear_user(void __user *mem, unsigned long len); static inline int __access_ok(unsigned long addr, unsigned long size); /* Teach asm-generic/uaccess.h that we have C functions for these. */ #define __access_ok __access_ok #define __clear_user __clear_user -#define strnlen_user strnlen_user -#define strncpy_from_user strncpy_from_user + #define INLINE_COPY_FROM_USER #define INLINE_COPY_TO_USER