Cc: Andrew Morton <akpm@...>, H. Peter Anvin <hpa@...>, Thomas Gleixner <tglx@...>, Gabriel C <nix.or.die@...>, Mika Fischer <mika.fischer@...>, linux-kernel@vger.kernel.org <linux-kernel@...>
this should be a single:
#ifdef CONFIG_MTRR_SANITIZER
static int mtrr_cleanup_enabled = CONFIG_MTRR_SANITIZER_DEFAULT;
#endif
block.
small explaination (comment) about what the limit means.
looks cleaner this way:
static int __init
add_range(struct res_range *range, int nr_range, unsigned long start,
unsigned long end, int merge)
perhaps factor out the loop into a separate function and avoid the goto.
should be:
static void __init
subtract_range(struct res_range *range, unsigned long start,
unsigned long end)
can be:
int i, j;
stale newline.
should be some sort of more readable in_range() check?
s/unsigned address_bits/unsigned int address_bits/
also move range_sizek on a separate line.
plus we tend to align structures this way:
(to put the types and field names into a visually more consistent form)
should be:
static void __init
set_var_mtrr(unsigned int reg, unsigned long basek, unsigned long sizek,
unsigned char type, unsigned address_bits)
s/unsigned/unsigned int
hm, will this work on 64-bit? Above-4G is controlled via separate
mechanisms though so i guess it does.
use alignment macros instead.
put extra newline between variable definition and code.
initialization looks nicer with vertical alignment, i.e.:
the ++ is a hard to notice side-effect of the loop. It's cleaner to
separate it out or to have a for() loop for it.
try to use a 'christmas tree' ordering of variables, i.e.:
superfluous newline.
all in one, this is a very useful and nice feature.
Ingo
--