* [folded-merged] drm-i915-move-abs_diff-to-mathh-fix.patch removed from -mm tree
@ 2023-08-12 20:58 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-08-12 20:58 UTC (permalink / raw)
To: mm-commits, tvrtko.ursulin, rodrigo.vivi, rdunlap, p.zabel, linux,
joonas.lahtinen, jirislaby, jani.nikula, jani.nikula, imre.deak,
gregkh, deller, daniel, andi.shyti, akpm, airlied, adobriyan,
andriy.shevchenko, akpm
The quilt patch titled
Subject: math.h: document abs_diff()
has been removed from the -mm tree. Its filename was
drm-i915-move-abs_diff-to-mathh-fix.patch
This patch was dropped because it was folded into drm-i915-move-abs_diff-to-mathh.patch
------------------------------------------------------
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: math.h: document abs_diff()
Date: Fri, 4 Aug 2023 08:09:34 +0300
Initially abs_diff() has lack of documentation. Add it.
Link: https://lkml.kernel.org/r/20230804050934.83223-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: David Airlie <airlied@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/math.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
--- a/include/linux/math.h~drm-i915-move-abs_diff-to-mathh-fix
+++ a/include/linux/math.h
@@ -155,6 +155,18 @@ __STRUCT_FRACT(u32)
__builtin_types_compatible_p(typeof(x), unsigned type), \
({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
+/**
+ * abs_diff - return absolute value of the difference between the arguments
+ * @a: the first argument
+ * @b: the second argument
+ *
+ * @a and @b has to be of the same type. With this restriction we compare
+ * signed to signed and unsigned to unsigned. The result is the subtraction
+ * the smaller of the two from the bigger, hence result is always a positive
+ * value.
+ *
+ * Return: an absolute value of the difference between the @a and @b.
+ */
#define abs_diff(a, b) ({ \
typeof(a) __a = (a); \
typeof(b) __b = (b); \
_
Patches currently in -mm which might be from andriy.shevchenko@linux.intel.com are
kernelh-split-out-count_args-and-concatenate-to-argsh.patch
x86-asm-replace-custom-count_args-concatenate-implementations.patch
arm64-smccc-replace-custom-count_args-concatenate-implementations.patch
genetlink-replace-custom-concatenate-implementation.patch
drm-i915-move-abs_diff-to-mathh.patch
rangeh-move-resource-api-and-constant-to-respective-files.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-12 20:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-12 20:58 [folded-merged] drm-i915-move-abs_diff-to-mathh-fix.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.