From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760668AbbA3Qk0 (ORCPT ); Fri, 30 Jan 2015 11:40:26 -0500 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:37019 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754679AbbA3QkY (ORCPT ); Fri, 30 Jan 2015 11:40:24 -0500 Date: Fri, 30 Jan 2015 16:40:15 +0000 From: Russell King - ARM Linux To: Andre Przywara Cc: Andrew Morton , catalin.marinas@arm.com, Mel Gorman , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] arm/mm: fix compiler warning in pmdp_invalidate() (in -next) Message-ID: <20150130164015.GQ26493@n2100.arm.linux.org.uk> References: <20150130100620.GL2395@suse.de> <1422635852-21569-1-git-send-email-andre.przywara@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1422635852-21569-1-git-send-email-andre.przywara@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 30, 2015 at 04:37:32PM +0000, Andre Przywara wrote: > 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 > --- > Hi Andrew, > > Mel mentioned that I should send that simple fix below to you to > merge it with his original mmotm patch: > mm-convert-p_mknonnuma-and-remaining-page-table-manipulations.patch > The commit message above contains the mmotm-reference to this patch, > which will break when it hits mainline. > > Can you consider this? Given that's only a warning fix I am also > happy with resending it after -rc1, if you reckon that this arch/arm > change should not go via mmotm. This isn't correct though. > /* 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; > +} typedef struct { pmdval_t pmd; } pmd_t; typedef u32 pmdval_t; "0" is not compatible with pmd_t when STRICT_MM_TYPECHECKS is enabled. -- FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.