From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-media@vger.kernel.org
Subject: Re: [PATCH] smiapp: re-use clamp_t instead of min(..., max(...))
Date: Fri, 09 Aug 2013 00:43:23 +0200 [thread overview]
Message-ID: <3251824.sEh0l6OtR8@avalon> (raw)
In-Reply-To: <20130724155538.GF12281@valkosipuli.retiisi.org.uk>
Hi Sakari,
On Wednesday 24 July 2013 18:55:38 Sakari Ailus wrote:
> On Wed, Jul 24, 2013 at 06:49:24PM +0300, Andy Shevchenko wrote:
> > On Wed, Jul 24, 2013 at 6:45 PM, Sakari Ailus <sakari.ailus@iki.fi> wrote:
> >
> > []
> >
> > >> + max_m = clamp_t(u32, max_m,
> > >> sensor->limits[SMIAPP_LIMIT_SCALER_M_MIN], +
> > >> sensor->limits[SMIAPP_LIMIT_SCALER_M_MAX]);
> > >
> > > Do you need clamp_t()? Wouldn't plain clamp() do?
> >
> > The *_t variants are preferred due to they are faster (no type checking).
> >
> > > I can change it if you're ok with that.
> >
> > I don't know why you may choose clamp instead of clamp_t here. Are you
> > going to change variable types?
>
> Probably not. But clamp() would serve as a sanity check vs. clamp_t() which
> just does the thing. I'd prefer clamp() --- the compiler will not spend much
> time on it anyway.
Should I take this patch in my tree ? If so, could you please repost it with
clamp() instead of clamp_t(), and your SoB or Acked-by ?
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2013-08-08 22:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-24 15:21 [PATCH] smiapp: re-use clamp_t instead of min(..., max(...)) Andy Shevchenko
2013-07-24 15:45 ` Sakari Ailus
2013-07-24 15:49 ` Andy Shevchenko
2013-07-24 15:55 ` Sakari Ailus
2013-07-25 7:47 ` Andy Shevchenko
2013-08-08 22:43 ` Laurent Pinchart [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3251824.sEh0l6OtR8@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox