summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorMathieu Malaterre2018-01-02 19:53:15 +0100
committerJames Hogan2018-02-19 11:55:38 +0100
commitab3d8441290bcd648f487b69ea87cfe5b37d9e02 (patch)
tree18d1e74f8276386f4f4deda573fcfc46942beb74 /arch/mips/kernel
parentMIPS: Make declaration for function `memory_region_available` static (diff)
downloadkernel-qcow2-linux-ab3d8441290bcd648f487b69ea87cfe5b37d9e02.tar.gz
kernel-qcow2-linux-ab3d8441290bcd648f487b69ea87cfe5b37d9e02.tar.xz
kernel-qcow2-linux-ab3d8441290bcd648f487b69ea87cfe5b37d9e02.zip
MIPS: Remove a warning when PHYS_OFFSET is 0x0
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 during compilation using W=1: 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 <malat@debian.org> Reviewed-by: James Hogan <jhogan@kernel.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/18176/ Signed-off-by: James Hogan <jhogan@kernel.org>
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/setup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 28be8f238e77..563188ac6fa2 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -454,7 +454,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);
}