From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot0-f198.google.com (mail-ot0-f198.google.com [74.125.82.198]) by kanga.kvack.org (Postfix) with ESMTP id 933426B0033 for ; Thu, 23 Nov 2017 10:31:43 -0500 (EST) Received: by mail-ot0-f198.google.com with SMTP id c41so10198301otc.18 for ; Thu, 23 Nov 2017 07:31:43 -0800 (PST) Received: from foss.arm.com (foss.arm.com. [217.140.101.70]) by mx.google.com with ESMTP id u15si8527775ote.40.2017.11.23.07.31.42 for ; Thu, 23 Nov 2017 07:31:42 -0800 (PST) Date: Thu, 23 Nov 2017 15:31:34 +0000 From: Mark Rutland Subject: Re: [PATCH 01/11] Initialize the mapping of KASan shadow memory Message-ID: <20171123153133.mwyuxthy2ysktx7c@lakrids.cambridge.arm.com> References: <87po8ir1kg.fsf@on-the-bus.cambridge.arm.com> <87375eqobb.fsf@on-the-bus.cambridge.arm.com> <20171117073556.GB28855@cbox> <20171118134841.3f6c9183@why.wild-wind.fr.eu.org> <20171121122938.sydii3i36jbzi7x4@lakrids.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: "Liuwenliang (Abbott Liu)" Cc: Marc Zyngier , "tixy@linaro.org" , "mhocko@suse.com" , "grygorii.strashko@linaro.org" , "catalin.marinas@arm.com" , "linux-mm@kvack.org" , "glider@google.com" , "afzal.mohd.ma@gmail.com" , "mingo@kernel.org" , Christoffer Dall , "f.fainelli@gmail.com" , "mawilcox@microsoft.com" , "linux@armlinux.org.uk" , "kasan-dev@googlegroups.com" , Dailei , "linux-arm-kernel@lists.infradead.org" , "aryabinin@virtuozzo.com" , "labbott@redhat.com" , "vladimir.murzin@arm.com" , "keescook@chromium.org" , "arnd@arndb.de" , Zengweilin , "opendmb@gmail.com" , Heshaoliang , "tglx@linutronix.de" , "dvyukov@google.com" , "ard.biesheuvel@linaro.org" , "linux-kernel@vger.kernel.org" , Jiazhenghua , "akpm@linux-foundation.org" , "robin.murphy@arm.com" , "thgarnie@google.com" , "kirill.shutemov@linux.intel.com" On Wed, Nov 22, 2017 at 12:56:44PM +0000, Liuwenliang (Abbott Liu) wrote: > +static inline u64 get_ttbr0(void) > +{ > + if (IS_ENABLED(CONFIG_ARM_LPAE)) > + return read_sysreg(TTBR0_64); > + else > + return (u64)read_sysreg(TTBR0_32); > +} > +static inline u64 get_ttbr1(void) > +{ > + if (IS_ENABLED(CONFIG_ARM_LPAE)) > + return read_sysreg(TTBR1_64); > + else > + return (u64)read_sysreg(TTBR1_32); > +} In addition to the whitespace damage that need to be fixed, there's no need for the u64 casts here. The compiler will implicitly cast to the return type, and as u32 and u64 are both arithmetic types, we don't need an explicit cast here. Thanks, Mark. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org