From mboxrd@z Thu Jan 1 00:00:00 1970 From: Geert Uytterhoeven Subject: Re: [PATCH] mm: remove kern_addr_valid() completely Date: Tue, 18 Oct 2022 09:30:42 +0200 Message-ID: References: <20221018074014.185687-1-wangkefeng.wang@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=F8QPLeeNm1sg3XCpfMCQFtBtaIEhLiHV7IiWh9BGC5c=; b=rESh3pwb4vHmCs enX8snbwAvSFC2U57Tmjao+nDQ0Q6FNQypRgY5wq57XT9C8iuNoru8YX4nGo6vM4Mpq3JIJuapis9 nczDnzCBzR0KF9QHKE02AXguZPiDf0nWybOo+06pI2DICSPBbeAyLXVk3g5bFcNCOAyvT5sZR7np+ H4KhH1BZIgTsq+6NEr2xepaROk7JQ3zGRJ8/z0kdDLkUt+D/Pj8pBHyG2Ppv6eon6vV2kqGPyjXjA 4tlQPUmO9Ni8Vhl1nVpV23nXTsYcjkSnj82A6Q5JY9aYtjVliVetec9gCU/y5P9A2uk1/nXnG1l6U JQZFYnhqSmPb9BLbMxoA==; In-Reply-To: <20221018074014.185687-1-wangkefeng.wang@huawei.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+glpr-linux-riscv=m.gmane-mx.org@lists.infradead.org To: Kefeng Wang Cc: Andrew Morton , linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, openrisc@lists.librecores.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, linux-xtensa@linux-xtensa.org, linux-fsdevel@vger.kernel.org, Richard Henderson , Ivan Kokshaysky , Matt Turner , Vineet Gupta , Russell King , Catalin Marinas On Tue, Oct 18, 2022 at 9:25 AM Kefeng Wang wrote: > Most architectures(except arm64/x86/sparc) simply return 1 for > kern_addr_valid(), which is only used in read_kcore(), and it > calls copy_from_kernel_nofault() which could check whether the > address is a valid kernel address, so no need kern_addr_valid(), > let's remove unneeded kern_addr_valid() completely. > > Signed-off-by: Kefeng Wang > arch/m68k/include/asm/pgtable_mm.h | 2 - > arch/m68k/include/asm/pgtable_no.h | 1 - Acked-by: Geert Uytterhoeven [m68k] Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds