lkml.org 
[lkml]   [2008]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/6] kernel: add clamp(), clamp_t() and clamp_val() macros
On Tue, 11 Mar 2008 14:11:34 -0700 Harvey Harrison <harvey.harrison@gmail.com> wrote:

> Adds macros similar to min/max/min_t/max_t.
>
> Also, change the variable names used in the min/max macros to
> avoid shadowed variable warnings when min/max min_t/max_t are
> nested.
>
> clamp_val is useful when clamping to constants so all types are
> taken from typeof() the first arg.
>
> Small formatting changes to make all the macros have a similar
> form.
>
> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
> ---
> Andrew, this is a rollup of my original patch already in -mm with
> checkpatch warnings fixed up and one additional macro based on
> limit_value found in the b43 driver, called clamp_val.

Well, this is why I dislike replacement patches. You don't know what
changed, and the replacement patch can fail to incproporate fixes from
third parties.

> include/linux/kernel.h | 66 ++++++++++++++++++++++++++++++++++-------------
> 1 files changed, 48 insertions(+), 18 deletions(-)

And so it did. You lost my patch which removes the clamp() implementation
from v4l. Instead it seems that you put it into [2/6]. Which means that
this patch on its own will break the build, thus screwing up life for
git-bisect users.

Please don't screw up git-bisect users' lives.

> clamp_t is no longer used, but I introduce it anyway as some future
> user may want to force the return type similar to how min_t/max_t
> operate.

eh, just nuke it.

> 1.5.4.4.592.g32d4c

Is all this new infrastructure actually used? We seem to be adding more
complexity than we're taking away.



\
 
 \ /
  Last update: 2008-03-12 06:13    [W:0.070 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site