From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755128AbbA2Rst (ORCPT ); Thu, 29 Jan 2015 12:48:49 -0500 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:47304 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751381AbbA2Rss (ORCPT ); Thu, 29 Jan 2015 12:48:48 -0500 From: Andre Przywara To: catalin.marinas@arm.com, rmk+kernel@arm.linux.org.uk Cc: will.deacon@arm.com, Mel Gorman , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm/mm: fix compiler warning in pmdp_invalidate() (in -next) Date: Thu, 29 Jan 2015 17:48:00 +0000 Message-Id: <1422553680-25374-1-git-send-email-andre.przywara@arm.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit ff61d185f4e7 ("mm: convert p[te|md]_mknonnuma and remaining page table manipulations") removed a check in mm/pgtable-generic.c:pmdp_invalidate(), which leaves the pmd_mknotpresent macro the only user of the entry variable. For ARM/LPAE we use a constant 0 without referencing the argument to mark this condition, so the entry variable is no longer used here: mm/pgtable-generic.c: In function 'pmdp_invalidate': mm/pgtable-generic.c:195:8: warning: unused variable 'entry' [-Wunused-variable] pmd_t entry = *pmdp; ^ Replace the ARM macro implementation with a static inline function to get rid of this warning. Signed-off-by: Andre Przywara --- arch/arm/include/asm/pgtable-3level.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h index 370684d..0e51fbe 100644 --- a/arch/arm/include/asm/pgtable-3level.h +++ b/arch/arm/include/asm/pgtable-3level.h @@ -259,7 +259,10 @@ PMD_BIT_FUNC(mkyoung, |= PMD_SECT_AF); #define mk_pmd(page,prot) pfn_pmd(page_to_pfn(page),prot) /* represent a notpresent pmd by zero, this is used by pmdp_invalidate */ -#define pmd_mknotpresent(pmd) (__pmd(0)) +static inline pmd_t pmd_mknotpresent(pmd_t pmd) +{ + return 0; +} static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot) { -- 1.7.9.5