[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHmME9o-hSA3XBry5rJ7uWiJbky50S3qyZXZxn3f1usNmraz4A@mail.gmail.com>
Date: Fri, 23 Sep 2022 18:54:39 +0200
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Kees Cook <keescook@...omium.org>, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v2] minmax: clamp more efficiently by avoiding extra comparison
On Fri, Sep 23, 2022 at 6:53 PM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
>
> On Fri, Sep 23, 2022 at 09:41:19AM -0700, Kees Cook wrote:
> > On Fri, Sep 23, 2022 at 05:40:01PM +0200, Jason A. Donenfeld wrote:
>
> ...
>
> > > + __clamp(val, lo, hi), \
> > > + __clamp_once(val, lo, hi, __UNIQUE_ID(__val), __UNIQUE_ID(__lo), __UNIQUE_ID(__hi))); })
> >
> > *complaint about line being >100 characters, but I don't really care* If
> > anyone is really bothered, this looks fine, too:
> >
> > __clamp_once(val, lo, hi, \
> > __UNIQUE_ID(__val), __UNIQUE_ID(__lo), __UNIQUE_ID(__hi))); })
>
> Actually }) should occupy a separate line and it would be nice to have it for ({.
That's what I would have done, except another macro in there didn't do
it like that, so I tried to copy the existing form.
Kees - do you want to touch up stylistic things as you see fit upon
commit, or do you want a v3 from me?
Jason
Powered by blists - more mailing lists