[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240107201129.6106-1-zoo868e@gmail.com>
Date: Mon, 8 Jan 2024 04:11:29 +0800
From: Matt Jan <zoo868e@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
David Laight <David.Laight@...LAB.COM>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Herve Codina <herve.codina@...tlin.com>,
Mark Brown <broonie@...nel.org>,
Matt Jan <zoo868e@...il.com>,
"Matthew Wilcox (Oracle)" <willy@...radead.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH] minmax: allow comparisons of 'long long int' against 'unsigned char/short/int'
Since 'unsigned int' get promoted to 'signed long long int' it is safe
to compare them against an 'long long int' value.
Signed-off-by: Matt Jan <zoo868e@...il.com>
---
include/linux/minmax.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/minmax.h b/include/linux/minmax.h
index 2ec559284a9f..61171286b468 100644
--- a/include/linux/minmax.h
+++ b/include/linux/minmax.h
@@ -37,7 +37,7 @@
#define __types_ok(x, y) \
(__is_signed(x) == __is_signed(y) || \
- __is_signed((x) + 0) == __is_signed((y) + 0) || \
+ __is_signed((x) + 0ll) == __is_signed((y) + 0ll) || \
__is_noneg_int(x) || __is_noneg_int(y))
#define __cmp_op_min <
--
2.34.1
Powered by blists - more mailing lists