Re: [PATCH v7 26/27] x86: add Crash kernel low reservation

From: Borislav Petkov
Date: Wed Dec 19 2012 - 12:22:03 EST


On Mon, Dec 17, 2012 at 11:15:58PM -0800, Yinghai Lu wrote:
> +static u64 __init get_mem_size(unsigned long limit_pfn)
> +{
> + int i;
> + u64 pages = 0;
> + unsigned long start_pfn, end_pfn;
> +
> + for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, NULL) {
> + start_pfn = min_t(unsigned long, start_pfn, limit_pfn);
> + end_pfn = min_t(unsigned long, end_pfn, limit_pfn);
> + pages += end_pfn - start_pfn;
> + }
> +
> + return pages << PAGE_SHIFT;
> +}

This needs an empty function prototype for the .config variant where both

# CONFIG_BLK_DEV_INITRD is not set
# CONFIG_KEXEC is not set

otherwise:

arch/x86/kernel/setup.c:295:19: warning: âget_mem_sizeâ defined but not used [-Wunused-function]

At a second glance though, a better fix might be if that whole
if-deffery in setup.c could be cleaned up a bit.

Thanks.

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/