Blame SOURCES/mdadm-Fixup-broken-formatting2.patch

2c1b57
From d16a749444251c12689fa93d398149025a9c2398 Mon Sep 17 00:00:00 2001
2c1b57
From: Jes Sorensen <jsorensen@fb.com>
2c1b57
Date: Tue, 16 May 2017 14:09:57 -0400
2c1b57
Subject: [RHEL7.5 PATCH 145/169] mdadm: Fixup != broken formatting
2c1b57
2c1b57
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
2c1b57
---
2c1b57
 Assemble.c  |  4 ++--
2c1b57
 Grow.c      | 13 +++++++------
2c1b57
 policy.c    |  5 ++---
2c1b57
 restripe.c  |  8 +++++---
2c1b57
 super-ddf.c |  8 ++++----
2c1b57
 super0.c    |  8 ++++----
2c1b57
 6 files changed, 24 insertions(+), 22 deletions(-)
2c1b57
2c1b57
diff --git a/Assemble.c b/Assemble.c
2c1b57
index afc6d9c..3c10b6c 100644
2c1b57
--- a/Assemble.c
2c1b57
+++ b/Assemble.c
2c1b57
@@ -755,8 +755,8 @@ static int load_devices(struct devs *devices, char *devmap,
2c1b57
 			if (best[i] >=0 &&
2c1b57
 			    devices[best[i]].i.events ==
2c1b57
 			    devices[devcnt].i.events &&
2c1b57
-			    (devices[best[i]].i.disk.minor
2c1b57
-			     != devices[devcnt].i.disk.minor) &&
2c1b57
+			    (devices[best[i]].i.disk.minor !=
2c1b57
+			     devices[devcnt].i.disk.minor) &&
2c1b57
 			    st->ss == &super0 &&
2c1b57
 			    content->array.level != LEVEL_MULTIPATH) {
2c1b57
 				/* two different devices with identical superblock.
2c1b57
diff --git a/Grow.c b/Grow.c
2c1b57
index db3f18b..ecf5ca0 100644
2c1b57
--- a/Grow.c
2c1b57
+++ b/Grow.c
2c1b57
@@ -1403,8 +1403,8 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re)
2c1b57
 			if (info->new_layout == UnSet) {
2c1b57
 				int copies = 1 + (info->delta_disks
2c1b57
 						  / info->array.raid_disks);
2c1b57
-				if (info->array.raid_disks * (copies-1)
2c1b57
-				    != info->delta_disks)
2c1b57
+				if (info->array.raid_disks * (copies-1) !=
2c1b57
+				    info->delta_disks)
2c1b57
 					return "Impossible number of devices for RAID0->RAID10";
2c1b57
 				info->new_layout = 0x100 + copies;
2c1b57
 			}
2c1b57
@@ -3067,8 +3067,8 @@ static int reshape_array(char *container, int fd, char *devname,
2c1b57
 	if (restart &&
2c1b57
 	    (reshape.level != info->array.level ||
2c1b57
 	     reshape.before.layout != info->array.layout ||
2c1b57
-	     reshape.before.data_disks + reshape.parity
2c1b57
-	     != info->array.raid_disks - max(0, info->delta_disks))) {
2c1b57
+	     reshape.before.data_disks + reshape.parity !=
2c1b57
+	     info->array.raid_disks - max(0, info->delta_disks))) {
2c1b57
 		pr_err("reshape info is not in native format - cannot continue.\n");
2c1b57
 		goto release;
2c1b57
 	}
2c1b57
@@ -4281,8 +4281,9 @@ static int grow_backup(struct mdinfo *sra,
2c1b57
 						((char*)&bsb.sb_csum2)-((char*)&bsb));
2c1b57
 
2c1b57
 		rv = -1;
2c1b57
-		if ((unsigned long long)lseek64(destfd[i], destoffsets[i] - 4096, 0)
2c1b57
-		    != destoffsets[i] - 4096)
2c1b57
+		if ((unsigned long long)lseek64(destfd[i],
2c1b57
+						destoffsets[i] - 4096, 0) !=
2c1b57
+		    destoffsets[i] - 4096)
2c1b57
 			break;
2c1b57
 		if (write(destfd[i], &bsb, 512) != 512)
2c1b57
 			break;
2c1b57
diff --git a/policy.c b/policy.c
2c1b57
index 064d349..b17585a 100644
2c1b57
--- a/policy.c
2c1b57
+++ b/policy.c
2c1b57
@@ -887,9 +887,8 @@ int Write_rules(char *rule_name)
2c1b57
 		fd = 1;
2c1b57
 
2c1b57
 	/* write static invocation */
2c1b57
-	if (write(fd, udev_template_start,
2c1b57
-		  sizeof(udev_template_start) - 1)
2c1b57
-	    != (int)sizeof(udev_template_start)-1)
2c1b57
+	if (write(fd, udev_template_start, sizeof(udev_template_start) - 1) !=
2c1b57
+	    (int)sizeof(udev_template_start) - 1)
2c1b57
 		goto abort;
2c1b57
 
2c1b57
 	/* iterate, if none created or error occurred, remove file */
2c1b57
diff --git a/restripe.c b/restripe.c
2c1b57
index 6b31695..31b07e8 100644
2c1b57
--- a/restripe.c
2c1b57
+++ b/restripe.c
2c1b57
@@ -581,14 +581,16 @@ int save_stripes(int *source, unsigned long long *offsets,
2c1b57
 				       raid_disks, level, layout);
2c1b57
 			if (dnum < 0) abort();
2c1b57
 			if (source[dnum] < 0 ||
2c1b57
-			    lseek64(source[dnum], offsets[dnum]+offset, 0) < 0 ||
2c1b57
-			    read(source[dnum], buf+disk * chunk_size, chunk_size)
2c1b57
-			    != chunk_size)
2c1b57
+			    lseek64(source[dnum],
2c1b57
+				    offsets[dnum] + offset, 0) < 0 ||
2c1b57
+			    read(source[dnum], buf+disk * chunk_size,
2c1b57
+				 chunk_size) != chunk_size) {
2c1b57
 				if (failed <= 2) {
2c1b57
 					fdisk[failed] = dnum;
2c1b57
 					fblock[failed] = disk;
2c1b57
 					failed++;
2c1b57
 				}
2c1b57
+			}
2c1b57
 		}
2c1b57
 		if (failed == 0 || fblock[0] >= data_disks)
2c1b57
 			/* all data disks are good */
2c1b57
diff --git a/super-ddf.c b/super-ddf.c
2c1b57
index c233601..d02a19a 100644
2c1b57
--- a/super-ddf.c
2c1b57
+++ b/super-ddf.c
2c1b57
@@ -3511,8 +3511,8 @@ static int validate_geometry_ddf_bvd(struct supertype *st,
2c1b57
 		if (minsize == 0)
2c1b57
 			minsize = 8;
2c1b57
 		for (dl = ddf->dlist; dl ; dl = dl->next) {
2c1b57
-			if (find_space(ddf, dl, data_offset, &minsize)
2c1b57
-			    != INVALID_SECTORS)
2c1b57
+			if (find_space(ddf, dl, data_offset, &minsize) !=
2c1b57
+			    INVALID_SECTORS)
2c1b57
 				dcnt++;
2c1b57
 		}
2c1b57
 		if (dcnt < raiddisks) {
2c1b57
@@ -4004,8 +4004,8 @@ static int compare_super_ddf(struct supertype *st, struct supertype *tst)
2c1b57
 			continue;
2c1b57
 
2c1b57
 		if (posix_memalign((void **)&dl1, 512,
2c1b57
-		       sizeof(*dl1) + (first->max_part) * sizeof(dl1->vlist[0]))
2c1b57
-		    != 0) {
2c1b57
+				   sizeof(*dl1) + (first->max_part) *
2c1b57
+				   sizeof(dl1->vlist[0])) != 0) {
2c1b57
 			pr_err("could not allocate disk info buffer\n");
2c1b57
 			return 3;
2c1b57
 		}
2c1b57
diff --git a/super0.c b/super0.c
2c1b57
index dc13efb..756cab5 100644
2c1b57
--- a/super0.c
2c1b57
+++ b/super0.c
2c1b57
@@ -589,8 +589,8 @@ static int update_super0(struct supertype *st, struct mdinfo *info,
2c1b57
 			 * being marked 'sync'
2c1b57
 			 */
2c1b57
 			add = (1<
2c1b57
-		if (((sb->disks[d].state & ~mask) | add)
2c1b57
-		    != (unsigned)info->disk.state) {
2c1b57
+		if (((sb->disks[d].state & ~mask) | add) !=
2c1b57
+		    (unsigned)info->disk.state) {
2c1b57
 			sb->disks[d].state = info->disk.state | wonly |failfast;
2c1b57
 			rv = 1;
2c1b57
 		}
2c1b57
@@ -1058,8 +1058,8 @@ static int load_super0(struct supertype *st, int fd, char *devname)
2c1b57
 	 * valid.  If it doesn't clear the bit.  An --assemble --force
2c1b57
 	 * should get that written out.
2c1b57
 	 */
2c1b57
-	if (read(fd, super+1, ROUND_UP(sizeof(struct bitmap_super_s),4096))
2c1b57
-	    != ROUND_UP(sizeof(struct bitmap_super_s),4096))
2c1b57
+	if (read(fd, super+1, ROUND_UP(sizeof(struct bitmap_super_s),4096)) !=
2c1b57
+	    ROUND_UP(sizeof(struct bitmap_super_s), 4096))
2c1b57
 		goto no_bitmap;
2c1b57
 
2c1b57
 	uuid_from_super0(st, uuid);
2c1b57
-- 
2c1b57
2.7.4
2c1b57