On Mon 2009-09-07 15:22:10, Russell King - ARM Linux wrote: > On Tue, Aug 18, 2009 at 08:31:49AM +0530, Rabin Vincent wrote: > > Here's a fixed version: > > And here's my revised version with these fixes in. I changed the > while loop to a do..while loop instead (since we will always have > at least one memory bank, it's pointless doing that test for the > first iteration.) > > Acks and tested-bys would be useful please. > > +static int __init meminfo_cmp(const void *_a, const void *_b) > +{ > + const struct membank *a = _a, *b = _b; > + long cmp = bank_pfn_start(a) - bank_pfn_start(b); > + return cmp < 0 ? -1 : cmp > 0 ? 1 : 0; > +} I believe you can just return cmp here. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html