Re: [PATCH 2/3] e820_update_range(): Allow specifying ULLONG_MAX

From: Bernhard Walle
Date: Wed Jun 25 2008 - 08:04:49 EST


* Yinghai Lu [2008-06-24 13:21]:
>
> > it seems we should let the caller to use
> > e820_update_range(start, ULLONG_MAX - size,....)
> >
> > so you don't need to touch this func.
>
> or add sanitary check before using size in this func like
> if (size > ULLONG_MAX - start)
> size = ULLONG_MAX - start;
>
> e820_remove_range need to the same thing

I like that. I think the complexity should be in the function, and not
in the caller's function.



Bernhard
--
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development
--
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/