From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937100AbdAFESl (ORCPT ); Thu, 5 Jan 2017 23:18:41 -0500 Received: from mail-io0-f175.google.com ([209.85.223.175]:35762 "EHLO mail-io0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752533AbdAFER1 (ORCPT ); Thu, 5 Jan 2017 23:17:27 -0500 Date: Thu, 5 Jan 2017 23:17:25 -0500 (EST) From: Nicolas Pitre To: Laura Abbott cc: Russell King , Grygorii Strashko , linux-arm-kernel@lists.infradead.org, lilja.magnus@gmail.com, festevam@gmail.com, linux-kernel@vger.kernel.org, Laura Abbott Subject: Re: [PATCHv2 1/2] arm: Cleanup sanity_check_meminfo In-Reply-To: <1483657274-11346-2-git-send-email-labbott@redhat.com> Message-ID: References: <1483657274-11346-1-git-send-email-labbott@redhat.com> <1483657274-11346-2-git-send-email-labbott@redhat.com> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 5 Jan 2017, Laura Abbott wrote: > > The logic for sanity_check_meminfo has become difficult to > follow. Clean up the code so it's more obvious what the code > is actually trying to do. Additionally, meminfo is now removed > so rename the function to better describe it's purpose. s/it's/its/ > Signed-off-by: Laura Abbott > Signed-off-by: Laura Abbott > --- > v2: Fixed code so b9a019899f61 ("ARM: 8590/1: sanity_check_meminfo(): > avoid overflow on vmalloc_limit") should stay fixed. The casting and assignment > still seem ugly. Are you referring to the initial vmalloc_limit assignment? > @@ -1172,43 +1170,19 @@ void __init sanity_check_meminfo(void) > for_each_memblock(memory, reg) { > phys_addr_t block_start = reg->base; > phys_addr_t block_end = reg->base + reg->size; > - phys_addr_t size_limit = reg->size; > > - if (reg->base >= vmalloc_limit) > - highmem = 1; > - else > - size_limit = vmalloc_limit - reg->base; > > - [...] This leaves a spurious empty line. One was already there before your patch but this would be a good opportunity to remove it. Other than that... Reviewed-by: Nicolas Pitre Nicolas