aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-12-08 12:56:02 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-09 11:08:07 +0000
commit8bc0d2f2197430723f8b2d0785169e48c883eedb (patch)
tree464f47d06389a74ec9f2e6832ee3082c175c8341 /meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch
parent59db12fdf294cfab5c1730337d092a75867658f7 (diff)
downloadopenembedded-core-contrib-8bc0d2f2197430723f8b2d0785169e48c883eedb.tar.gz
mdadm: Drop redundant patches and fix build with clang
Several patches were being applied unnecessarily, the purpose they served at one point has either been fixed differently, or accepted upstream. Add a new patch to make clang's diagnostics happy Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch')
-rw-r--r--meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch b/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch
new file mode 100644
index 0000000000..803a59b3ec
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/0001-Compute-abs-diff-in-a-standard-compliant-way.patch
@@ -0,0 +1,31 @@
+From b273e892bd6aaafe448f84356abb78a6d463e784 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 7 Dec 2018 17:22:39 -0800
+Subject: [PATCH] Compute abs diff in a standard compliant way
+
+This make it a bit less implementation defined and silences clang
+warning -Wabsolute-value
+
+| super-intel.c:2822:20: error: taking the absolute value of unsigned type 'unsi
+gned long long' has no effect [-Werror,-Wabsolute-value]
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ super-intel.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/super-intel.c b/super-intel.c
+index 6438987..10d7218 100644
+--- a/super-intel.c
++++ b/super-intel.c
+@@ -2819,7 +2819,7 @@ static unsigned long long calc_component_size(struct imsm_map *map,
+ * 2048 blocks per each device. If the difference is higher it means
+ * that array size was expanded and num_data_stripes was not updated.
+ */
+- if ((unsigned int)abs(calc_dev_size - dev_size) >
++ if ((unsigned int)abs((int)calc_dev_size - (int)dev_size) >
+ (1 << SECT_PER_MB_SHIFT) * member_disks) {
+ component_size = dev_size / member_disks;
+ dprintf("Invalid num_data_stripes in metadata; expected=%llu, found=%llu\n",