> > Okay take a look at > > http://www.skynet.ie/~airlied/patches/dri/mtrr_removal.diff > > This is how I intend dumping the __HAVE_ set of macros, I've just patched > the radeon in this patch.. any objections to this approach any neater ways > to do it?
A few points (based only on the diff). 1) Rename CONFIG_MTRR to CONFIG_DRM_MTRR to provide better context 2) When CONFIR_DRM_MTRR is not defined provide dummy stubs for: mtrr_add and mtrr_del See for example include/linux/procfs.h for good examples Implementing the dummy functions would significanly improve readability of code. 3) The following code +#if __REALLY_HAVE_AGP && defined(CONFIG_MTRR) + if ( (dev->driver_features & DRIVER_USE_MTRR) && dev->agp && ... Could be replaced by a stub function: #ifdef CONFIG_DRM_MTRR static inline int driver_has_mtrr(...) { return (feature & DRIVER_USE_MTRR) != 0; } #else static inline int driver_has_mtrr(...) { return 0; } #endif This check seems to be used more than one place. 4) Use #ifdef, not #if defined() 5) Why not post the diff, makes it _much_ easier to reply wtih code comments. Sam ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 -- _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel