Re: [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: [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. + */ +#define

Re: [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: [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

Re: [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:

Re: [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 _tmp

Re: [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 daniel.vet...@intel.com Cc: Jani Nikula

Re: [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: [PATCH 1/4] kernel.h: Implement DIV_ROUND_CLOSEST_ULL

2015-03-20 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: [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 >

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

2015-03-20 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:

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

2015-03-20 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

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

2015-03-20 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 daniel.vet...@intel.com Cc: Jani Nikula jani.nik...@linux.intel.com Cc: David Airlie airl...@linux.ie Cc: Darrick J. Wong

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

2015-03-20 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 daniel.vet...@intel.com Cc: Jani Nikula jani.nik...@linux.intel.com Cc:

Re: [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 javi.mer...@arm.com 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 daniel.vet...@intel.com Cc: Jani Nikula

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

2015-03-20 Thread Javi Merino
On Fri, Mar 20, 2015 at 06:19:26PM +, Emil Velikov wrote: On 20 March 2015 at 11:14, Javi Merino javi.mer...@arm.com 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.