From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,jic23@kernel.org,andriy.shevchenko@linux.intel.com,akpm@linux-foundation.org
Subject: [merged mm-nonmm-stable] mathh-amend-kernel-doc-and-add-a-note-about-signed-type-limits.patch removed from -mm tree
Date: Thu, 20 Nov 2025 14:04:35 -0800 [thread overview]
Message-ID: <20251120220436.59CDCC4CEF1@smtp.kernel.org> (raw)
The quilt patch titled
Subject: math.h: amend abs() kernel-doc and add a note about signed type limits
has been removed from the -mm tree. Its filename was
mathh-amend-kernel-doc-and-add-a-note-about-signed-type-limits.patch
This patch was dropped because it was merged into the mm-nonmm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: math.h: amend abs() kernel-doc and add a note about signed type limits
Date: Thu, 6 Nov 2025 16:20:51 +0100
- amend the kernel-doc so the description is decoupled from the
parameter descriptions.
- add a note to explain behaviour for the signed types when supplied
value is the minimum (e.g., INT_MIN for int type).
Link: https://lkml.kernel.org/r/20251106152051.2361551-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/math.h | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
--- a/include/linux/math.h~mathh-amend-kernel-doc-and-add-a-note-about-signed-type-limits
+++ a/include/linux/math.h
@@ -148,11 +148,16 @@ __STRUCT_FRACT(u32)
/**
* abs - return absolute value of an argument
- * @x: the value. If it is unsigned type, it is converted to signed type first.
- * char is treated as if it was signed (regardless of whether it really is)
- * but the macro's return type is preserved as char.
+ * @x: the value.
*
- * Return: an absolute value of x.
+ * If it is unsigned type, @x is converted to signed type first.
+ * char is treated as if it was signed (regardless of whether it really is)
+ * but the macro's return type is preserved as char.
+ *
+ * NOTE, for signed type if @x is the minimum, the returned result is undefined
+ * as there is not enough bits to represent it as a positive number.
+ *
+ * Return: an absolute value of @x.
*/
#define abs(x) __abs_choose_expr(x, long long, \
__abs_choose_expr(x, long, \
_
Patches currently in -mm which might be from andriy.shevchenko@linux.intel.com are
reply other threads:[~2025-11-20 22:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20251120220436.59CDCC4CEF1@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=jic23@kernel.org \
--cc=mm-commits@vger.kernel.org \
/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 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.