aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2020-09-03 14:08:01 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2020-09-03 14:11:48 +0200
commitdd05251ae3476b989c889031d15a7bb6e018d561 (patch)
tree9b8199aea9e260b6de77b57d93ca84424e7abcc5
parent5ae41666f80bdf86b5c0847fd4b7ac9739aa8b9b (diff)
ANDROID: overflow.h: fix merge issue with 4.9.235ASB-2020-09-05_4.9-q
There was a merge issue with overflow.h that ended up taking the same functions multiple times due to them coming in through different branches. Fix this up by only taking one version, fixing the build. Fixes: 5ae41666f80b ("Merge 4.9.235 into android-4.9-q") Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I20761777b130c0a03bd115c02bd51546264786fd
-rw-r--r--include/linux/overflow.h57
1 files changed, 0 insertions, 57 deletions
diff --git a/include/linux/overflow.h b/include/linux/overflow.h
index 0a7a84703c5e..30e7f16a4b83 100644
--- a/include/linux/overflow.h
+++ b/include/linux/overflow.h
@@ -203,63 +203,6 @@
#endif /* COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW */
/**
- * array_size() - Calculate size of 2-dimensional array.
- *
- * @a: dimension one
- * @b: dimension two
- *
- * Calculates size of 2-dimensional array: @a * @b.
- *
- * Returns: number of bytes needed to represent the array or SIZE_MAX on
- * overflow.
- */
-static inline __must_check size_t array_size(size_t a, size_t b)
-{
- size_t bytes;
-
- if (check_mul_overflow(a, b, &bytes))
- return SIZE_MAX;
-
- return bytes;
-}
-
-/**
- * array3_size() - Calculate size of 3-dimensional array.
- *
- * @a: dimension one
- * @b: dimension two
- * @c: dimension three
- *
- * Calculates size of 3-dimensional array: @a * @b * @c.
- *
- * Returns: number of bytes needed to represent the array or SIZE_MAX on
- * overflow.
- */
-static inline __must_check size_t array3_size(size_t a, size_t b, size_t c)
-{
- size_t bytes;
-
- if (check_mul_overflow(a, b, &bytes))
- return SIZE_MAX;
- if (check_mul_overflow(bytes, c, &bytes))
- return SIZE_MAX;
-
- return bytes;
-}
-
-static inline __must_check size_t __ab_c_size(size_t n, size_t size, size_t c)
-{
- size_t bytes;
-
- if (check_mul_overflow(n, size, &bytes))
- return SIZE_MAX;
- if (check_add_overflow(bytes, c, &bytes))
- return SIZE_MAX;
-
- return bytes;
-}
-
-/**
* struct_size() - Calculate size of structure with trailing array.
* @p: Pointer to the structure.
* @member: Name of the array member.