Blame SOURCES/0004-ndctl-test-Cleanup-unnecessary-out-label.patch

26ccd9
From ff4030e88da2cdcaf52c0d7457cd30264ea8915b Mon Sep 17 00:00:00 2001
26ccd9
From: Dan Williams <dan.j.williams@intel.com>
26ccd9
Date: Tue, 12 Jan 2021 23:15:03 -0800
26ccd9
Subject: [PATCH 004/217] ndctl/test: Cleanup unnecessary out label
26ccd9
26ccd9
There are no cleanup actions to take in test_dax_remap(), and it is already
26ccd9
inconsistent for having a single return point, so remove the out label.
26ccd9
26ccd9
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
26ccd9
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
26ccd9
Link: https://lore.kernel.org/r/161052210395.1804207.7318263492906073721.stgit@dwillia2-desk3.amr.corp.intel.com
26ccd9
---
26ccd9
 test/dax-pmd.c | 12 ++++--------
26ccd9
 1 file changed, 4 insertions(+), 8 deletions(-)
26ccd9
26ccd9
diff --git a/test/dax-pmd.c b/test/dax-pmd.c
26ccd9
index 401826d..b1251db 100644
26ccd9
--- a/test/dax-pmd.c
26ccd9
+++ b/test/dax-pmd.c
26ccd9
@@ -83,20 +83,18 @@ int test_dax_remap(struct ndctl_test *test, int dax_fd, unsigned long align, voi
26ccd9
 	act.sa_flags = SA_SIGINFO;
26ccd9
 	if (sigaction(SIGBUS, &act, 0)) {
26ccd9
 		perror("sigaction");
26ccd9
-		rc = EXIT_FAILURE;
26ccd9
-		goto out;
26ccd9
+		return EXIT_FAILURE;
26ccd9
 	}
26ccd9
 
26ccd9
 	/* test fault after device-dax instance disabled */
26ccd9
 	if (sigsetjmp(sj_env, 1)) {
26ccd9
 		if (!fsdax && align > SZ_4K) {
26ccd9
 			fprintf(stderr, "got expected SIGBUS after mremap() of device-dax\n");
26ccd9
-			rc = 0;
26ccd9
+			return 0;
26ccd9
 		} else {
26ccd9
 			fprintf(stderr, "unpexpected SIGBUS after mremap()\n");
26ccd9
-			rc = -EIO;
26ccd9
+			return -EIO;
26ccd9
 		}
26ccd9
-		goto out;
26ccd9
 	}
26ccd9
 
26ccd9
 	*(int *) anon = 0xAA;
26ccd9
@@ -107,9 +105,7 @@ int test_dax_remap(struct ndctl_test *test, int dax_fd, unsigned long align, voi
26ccd9
 		return -ENXIO;
26ccd9
 	}
26ccd9
 
26ccd9
-	rc = 0;
26ccd9
-out:
26ccd9
-	return rc;
26ccd9
+	return 0;
26ccd9
 }
26ccd9
 
26ccd9
 int test_dax_directio(int dax_fd, unsigned long align, void *dax_addr, off_t offset)
26ccd9
-- 
26ccd9
2.27.0
26ccd9