Several page allocator functions (__get_free_pages(), get_zeroed_page(), etc...) return 'unsigned long's for the virtual address of pages that have been allocated, not the 'struct page'. I have the feeling this was to differentiate them from things like __alloc_pages() that _do_ return a 'struct page *' and keep a hapless author from doing this: struct page *foo = get_zeroed_page(); struct my_struct *bar = page_to_virt(foo); and getting some senseless goo in 'bar' without some kind of compiler warning. While I'm sure this is effective at slapping a silly kernel programmer earlier than at runtime, it has also made users of those functions *store* those addresses in 'unsigned long's, which gets around doing a cast when the allocation occurs. (see net/packet/af_packet.c::packet_opt->pg_vec) But, they tend to go and do things like virt_to_phys(foo) on their new page, which is perfectly valid, but also properly generates a compiler warning if virt_to_phys() takes a 'void *'. Anyway, has anyone's opinion changed about the return types of those functions? Can I convince anyone that we should change them to return pointers? In in their structures, authors will use whatever types give them the fewest casts when they're initially coding, not necessarily what types they should be using. If we keep it the way it is, we pretty much require ourselved to have a bunch of ugly casts at alloc/free time: unsigned char *foo; foo = (unsigned char *)__get_free_pages(GFP_KERNEL, order); ... free_pages((unsigned long)foo, order); BTW, I've attached a patch to convert af_packet.c from using 'unsigned long' for its pointers to an actual pointer. -- Dave