On Mon, 12 Nov 2007, Jerome Glisse wrote: > 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
is that drmP.h header file also shared with BSD? because defining drm_order() that way pretty much requires you to have ilog2() and roundup_pow_of_two() defined, so you might as well just use this in drmP.h: #include <linux/log2.h> ... #define drm_order(n) order_base_2(n) wouldn't that work just as well? or did i misunderstand what you were getting at? rday ======================================================================== Robert P. J. Day Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA http://crashcourse.ca ======================================================================== ------------------------------------------------------------------------- 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
