From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A264C433FE for ; Tue, 11 Jan 2022 17:11:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 35DBE6B0095; Tue, 11 Jan 2022 12:11:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2E98B6B0096; Tue, 11 Jan 2022 12:11:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1AD5E6B0098; Tue, 11 Jan 2022 12:11:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0149.hostedemail.com [216.40.44.149]) by kanga.kvack.org (Postfix) with ESMTP id 07B166B0095 for ; Tue, 11 Jan 2022 12:11:02 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 9ED7B93D85 for ; Tue, 11 Jan 2022 17:11:01 +0000 (UTC) X-FDA: 79018646322.10.311ACEA Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf14.hostedemail.com (Postfix) with ESMTP id 1D35D10000D for ; Tue, 11 Jan 2022 17:11:00 +0000 (UTC) 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 dfw.source.kernel.org (Postfix) with ESMTPS id BC8126170D; Tue, 11 Jan 2022 17:10:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02511C36AEB; Tue, 11 Jan 2022 17:10:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641921059; bh=GhDvYFZGPRT80b9dqotfwgVnldQY1ncyLaPdagj1mBM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XBiJhLA6JzUOHUpzbouhgmeQVRu+bwMItqkjG6cf0SxClEMTTly5zRh+oWRBl56Md pyDu9y4JwuQU61iJ0U4TQZ8+VX1BIT78IfibtQeTyj1ubVQlc0iuS6SFiuIXIOsANK nC8WJwG/1aFSvvUxsr8bdev/yCK/wSEr8Y/GTCyJNxsTJK4DVTSZnnSP9MTjg61TrX tbJZOWozAUodS3Mfw4BKdKSgjCDNuFQgNRLmr5dFI7z4mgRRwK61AdkLrjGV1fmuw2 sukPzbZE+dg8Cc2EDdJpOKOREVNPPKbiE8M2LQrlfQJlqebaS8f17PF+bIPBxHUAfa I5l11pCGl/+sA== Date: Tue, 11 Jan 2022 19:10:52 +0200 From: Mike Rapoport To: Christian Dietrich Cc: Andrew Morton , Mike Rapoport , linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] mm/pgtable: define pte_index so that preprocessor could recognize it Message-ID: References: <20220111145457.20748-1-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: brw5pk4me4s7ffpgjtsju6grdayfjr3d Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=XBiJhLA6; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf14.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 1D35D10000D X-HE-Tag: 1641921060-940073 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Christian, On Tue, Jan 11, 2022 at 04:20:34PM +0100, Christian Dietrich wrote: > Hello Mike! > > Mike Rapoport [11. Januar 2022]: > > > diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h > > index e24d2c992b11..d468efcf48f4 100644 > > --- a/include/linux/pgtable.h > > +++ b/include/linux/pgtable.h > > @@ -62,6 +62,7 @@ static inline unsigned long pte_index(unsigned long address) > > { > > return (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1); > > } > > +#define pte_index pte_index > > Wouldn't it make sense to remove the dead CPP blocks (#ifdef pte_index) > from mm/memory.c? It does make sense to remove the dead code, but this cleanup does not need stable backporting so it'll be a separate patch. Care to send a patch? ;-) > Or is there a case were pte_index is not defined for an architecture? Nope, the fix in include/linux/pgtable.h covers MMU architectures and NOMMU do not compile mm/memory.c anyway. > chris > -- -- Sincerely yours, Mike.