Ok, I get your point Myles.
I did do it a little different on the i830. I just added an extra variable so if CONFIG_VIDEO_MB is 0 it doesn't really do anything. Then it subtracts from tomk afterwards, like this:
int igd_memory = 0;
if (CONFIG_VIDEO_MB == 512) { igd_memory = (CONFIG_VIDEO_MB); } else { igd_memory = (CONFIG_VIDEO_MB * 1024); }
tomk -= igd_memory;
Elia I think this would work nicely for you.