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