[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZMx5cp1u5noAH0Zg@smile.fi.intel.com>
Date: Fri, 4 Aug 2023 07:07:14 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Jani Nikula <jani.nikula@...el.com>,
Imre Deak <imre.deak@...el.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Andi Shyti <andi.shyti@...ux.intel.com>,
Jiri Slaby <jirislaby@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Alexey Dobriyan <adobriyan@...il.com>,
intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
linux-fbdev@...r.kernel.org,
Jani Nikula <jani.nikula@...ux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>, Helge Deller <deller@....de>,
Rasmus Villemoes <linux@...musvillemoes.dk>
Subject: Re: [PATCH v4 1/1] drm/i915: Move abs_diff() to math.h
On Thu, Aug 03, 2023 at 10:24:46AM -0700, Andrew Morton wrote:
> On Thu, 3 Aug 2023 16:19:18 +0300 Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:
...
> > +#define abs_diff(a, b) ({ \
> > + typeof(a) __a = (a); \
> > + typeof(b) __b = (b); \
> > + (void)(&__a == &__b); \
> > + __a > __b ? (__a - __b) : (__b - __a); \
> > +})
>
> Can we document it please?
>
> Also, the open-coded type comparison could be replaced with __typecheck()?
>
> And why the heck isn't __typecheck() in typecheck.h, to be included by
> minmax.h.
>
> etcetera. Sigh. I'll grab it, but please at least send along some
> kerneldoc?
Sure and thank you!
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists