Re: [Intel-gfx] [PATCH 1/4] kernel.h: Implement DIV_ROUND_CLOSEST_ULL

2015-03-24 Thread Javi Merino
On Mon, Mar 23, 2015 at 05:04:16PM +, Javi Merino wrote: > On Mon, Mar 23, 2015 at 12:34:04PM +, Jeff Epler wrote: > > On Fri, Mar 20, 2015 at 11:14:40AM +, Javi Merino wrote: > > > +/* > > > + * Same as above but for u64 dividends. divisor must be a 32-bit > > > + * number. > > > + */

Re: [Intel-gfx] [PATCH 1/4] kernel.h: Implement DIV_ROUND_CLOSEST_ULL

2015-03-23 Thread Javi Merino
On Mon, Mar 23, 2015 at 12:34:04PM +, Jeff Epler wrote: > On Fri, Mar 20, 2015 at 11:14:40AM +, Javi Merino wrote: > > +/* > > + * Same as above but for u64 dividends. divisor must be a 32-bit > > + * number. > > + */ > > +#define DIV_ROUND_CLOSEST_ULL(x, divisor)( \ > > +{

Re: [Intel-gfx] [PATCH 1/4] kernel.h: Implement DIV_ROUND_CLOSEST_ULL

2015-03-23 Thread Jeff Epler
On Fri, Mar 20, 2015 at 11:14:40AM +, Javi Merino wrote: > +/* > + * Same as above but for u64 dividends. divisor must be a 32-bit > + * number. > + */ > +#define DIV_ROUND_CLOSEST_ULL(x, divisor)( \ > +{\ > + unsigned long long

Re: [Intel-gfx] [PATCH 1/4] kernel.h: Implement DIV_ROUND_CLOSEST_ULL

2015-03-23 Thread Alex Elder
On 03/20/2015 06:14 AM, Javi Merino wrote: > We have grown a number of different implementations of > DIV_ROUND_CLOSEST_ULL throughout the kernel. Move the i915 one to > kernel.h so that it can be reused. > > Cc: Daniel Vetter > Cc: Jani Nikula > Cc: David Airlie > Cc: Darrick J. Wong > Cc: G

[Intel-gfx] [PATCH 1/4] kernel.h: Implement DIV_ROUND_CLOSEST_ULL

2015-03-23 Thread Javi Merino
We have grown a number of different implementations of DIV_ROUND_CLOSEST_ULL throughout the kernel. Move the i915 one to kernel.h so that it can be reused. Cc: Daniel Vetter Cc: Jani Nikula Cc: David Airlie Cc: Darrick J. Wong Cc: Guenter Roeck Cc: Andrew Morton Signed-off-by: Javi Merino

Re: [Intel-gfx] [PATCH 1/4] kernel.h: Implement DIV_ROUND_CLOSEST_ULL

2015-03-23 Thread Javi Merino
On Fri, Mar 20, 2015 at 06:19:26PM +, Emil Velikov wrote: > On 20 March 2015 at 11:14, Javi Merino wrote: > > We have grown a number of different implementations of > > DIV_ROUND_CLOSEST_ULL throughout the kernel. Move the i915 one to > > kernel.h so that it can be reused. > > > > Cc: Daniel

Re: [Intel-gfx] [PATCH 1/4] kernel.h: Implement DIV_ROUND_CLOSEST_ULL

2015-03-23 Thread Daniel Vetter
On Fri, Mar 20, 2015 at 11:14:40AM +, Javi Merino wrote: > We have grown a number of different implementations of > DIV_ROUND_CLOSEST_ULL throughout the kernel. Move the i915 one to > kernel.h so that it can be reused. > > Cc: Daniel Vetter > Cc: Jani Nikula > Cc: David Airlie > Cc: Darric

Re: [Intel-gfx] [PATCH 1/4] kernel.h: Implement DIV_ROUND_CLOSEST_ULL

2015-03-20 Thread Emil Velikov
On 20 March 2015 at 11:14, Javi Merino wrote: > We have grown a number of different implementations of > DIV_ROUND_CLOSEST_ULL throughout the kernel. Move the i915 one to > kernel.h so that it can be reused. > > Cc: Daniel Vetter > Cc: Jani Nikula > Cc: David Airlie > Cc: Darrick J. Wong > Cc