Robert P. J. Day wrote: > just a preliminary post -- i submitted a short patch to add a > generic order_base_2() macro to <linux/log2.h>, which would allow the > following simplification to drm code. is there anything obviously > wrong with what follows? > > the macro added to log2.h was simply: > > #define order_base_2(n) ilog2(roundup_pow_of_two(n)) >
This code is shared with bsd, so you better define: #define drm_order(n) ilog2(roundup_pow_of_two(n)) in drmP.h and remove implementation from drm_bufs.c As a general rules it's better to not replace any drm_ function with linux specific functions without checking that you are in a linux specific file (for this checkout the git drm git clone git://anongit.freedesktop.org/mesa/drm and look into linux-core any files which are linked from shared-core should not have any linux specific things). Cheers, Jerome Glisse ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
