Re: [PATCH] include: kernel.h: deduplicate code implementing clamp* macros

2014-09-26 Thread Michal Nazarewicz
On Thu, Sep 25 2014, Hagen Paul Pfeifer wrote: > On 25 September 2014 17:50, Michal Nazarewicz wrote: > >> - * @min: minimum allowable value >> - * @max: maximum allowable value >> + * @lo: minimum allowable value >> + * @hi: maximum allowable value > > Ok, but why do you rename min/max to low/hi

Re: [PATCH] include: kernel.h: deduplicate code implementing clamp* macros

2014-09-25 Thread Hagen Paul Pfeifer
On 25 September 2014 17:50, Michal Nazarewicz wrote: > - * @min: minimum allowable value > - * @max: maximum allowable value > + * @lo: minimum allowable value > + * @hi: maximum allowable value Ok, but why do you rename min/max to low/high after so many years? min/max is just perfect Hagen --

[PATCH] include: kernel.h: deduplicate code implementing clamp* macros

2014-09-25 Thread Michal Nazarewicz
Instead of open-coding clamp_t macro min_t and max_t the way clamp macro does and instead of open-coding clamp_val simply use clamp_t. Furthermore, normalise argument naming in the macros to be lo and hi. Signed-off-by: Michal Nazarewicz --- include/linux/kernel.h | 24 +++-