Re: [PATCH] Use const* parameters in mm.h

From: Andrew Morton
Date: Fri Mar 24 2006 - 16:30:20 EST


"J.A. Magallon" <jamagallon@xxxxxxx> wrote:
>
> As they are inline, this gives the compiler wide space for optmizations.
>
> --- linux-2.6.15-rc5-mm2.orig/include/linux/mm.h 2005-12-12 09:10:34.000000000 -0800
> +++ linux-2.6.15-rc5-mm2/include/linux/mm.h 2005-12-14 14:39:50.000000000 -0800
> @@ -464,7 +464,7 @@ void put_page(struct page *page);
> #define SECTIONS_MASK ((1UL << SECTIONS_WIDTH) - 1)
> #define ZONETABLE_MASK ((1UL << ZONETABLE_SHIFT) - 1)
>
> -static inline unsigned long page_zonenum(struct page *page)
> +static inline unsigned long page_zonenum(const struct page *page)
> ...

This makes zero difference in x86 allnoconfig code size with both gcc-3.2.1
and gcc-4.1.
-
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/