Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751323AbdLZLiL (ORCPT ); Tue, 26 Dec 2017 06:38:11 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:34983 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750776AbdLZLiJ (ORCPT ); Tue, 26 Dec 2017 06:38:09 -0500 X-Google-Smtp-Source: ACJfBov6b8PT6K+O3L6QnD0f22pVrp1kjSXUgiFP8ya+nFNr7eW7A7QlxTCbn7JxCV747zPdw5lwkA== From: Mathieu Malaterre Cc: Mathieu Malaterre , Ralf Baechle , Marcin Nowakowski , Miodrag Dinic , James Hogan , Aleksandar Markovic , David Daney , linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] MIPS: Remove a warning when PHYS_OFFSET is 0x0 Date: Tue, 26 Dec 2017 12:37:14 +0100 Message-Id: <20171226113717.15074-2-malat@debian.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171226113717.15074-1-malat@debian.org> References: <20171226113717.15074-1-malat@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1168 Lines: 32 Rewrite the comparison in `else if` statement, case where `min_low_pfn > ARCH_PFN_OFFSET` has already been checked in the first `if` statement: if (min_low_pfn > ARCH_PFN_OFFSET) { Fix non-fatal warning: arch/mips/kernel/setup.c: In function ‘bootmem_init’: arch/mips/kernel/setup.c:461:25: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] } else if (min_low_pfn < ARCH_PFN_OFFSET) { ^ Signed-off-by: Mathieu Malaterre --- arch/mips/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index f19d61224c71..073695ccc1aa 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -458,7 +458,7 @@ static void __init bootmem_init(void) pr_info("Wasting %lu bytes for tracking %lu unused pages\n", (min_low_pfn - ARCH_PFN_OFFSET) * sizeof(struct page), min_low_pfn - ARCH_PFN_OFFSET); - } else if (min_low_pfn < ARCH_PFN_OFFSET) { + } else if (ARCH_PFN_OFFSET - min_low_pfn > 0UL) { pr_info("%lu free pages won't be used\n", ARCH_PFN_OFFSET - min_low_pfn); } -- 2.11.0