Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933230AbbLOIJq (ORCPT ); Tue, 15 Dec 2015 03:09:46 -0500 Received: from mail.kernel.org ([198.145.29.136]:33987 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753289AbbLOIJf (ORCPT ); Tue, 15 Dec 2015 03:09:35 -0500 From: Andy Lutomirski To: Pavel Machek , x86@kernel.org Cc: Arjan van de Ven , Linus Torvalds , Borislav Petkov , linux-kernel@vger.kernel.org, Stephen Smalley , Brian Gerst , Denys Vlasenko , hpa@zytor.com, Mike Galbraith , Peter Zijlstra , Andy Lutomirski Subject: [PATCH 2/2] x86/mm: Make kmap_prot into a #define Date: Tue, 15 Dec 2015 00:09:30 -0800 Message-Id: <274864c1e385346959b80804236675bd30ea2d95.1450166786.git.luto@kernel.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: References: <20151215075656.GA3734@amd> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1576 Lines: 52 The value (once we initialize it) is a foregone conclusion. Make it a #define to save a tiny amount of text and data size and to make it more comprehensible. Signed-off-by: Andy Lutomirski --- arch/x86/include/asm/fixmap.h | 2 +- arch/x86/mm/init_32.c | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h index 32c60a02ec80..ce941b7e7900 100644 --- a/arch/x86/include/asm/fixmap.h +++ b/arch/x86/include/asm/fixmap.h @@ -142,7 +142,7 @@ extern void reserve_top_address(unsigned long reserve); extern int fixmaps_set; extern pte_t *kmap_pte; -extern pgprot_t kmap_prot; +#define kmap_prot PAGE_KERNEL extern pte_t *pkmap_page_table; void __native_set_fixmap(enum fixed_addresses idx, pte_t pte); diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index cb4ef3de61f9..a4bb1c7ab65e 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c @@ -388,7 +388,6 @@ repeat: } pte_t *kmap_pte; -pgprot_t kmap_prot; static inline pte_t *kmap_get_fixmap_pte(unsigned long vaddr) { @@ -405,8 +404,6 @@ static void __init kmap_init(void) */ kmap_vstart = __fix_to_virt(FIX_KMAP_BEGIN); kmap_pte = kmap_get_fixmap_pte(kmap_vstart); - - kmap_prot = PAGE_KERNEL; } #ifdef CONFIG_HIGHMEM -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/