|
|
2eb93d |
From ee7fabed859d07809dc3cfe6b23b7ad3b0c6cd73 Mon Sep 17 00:00:00 2001
|
|
|
2eb93d |
From: Dan Williams <dan.j.williams@intel.com>
|
|
|
2eb93d |
Date: Tue, 12 Jan 2021 23:14:58 -0800
|
|
|
2eb93d |
Subject: [PATCH 003/217] ndctl/test: Fix btt expect table compile warning
|
|
|
2eb93d |
|
|
|
2eb93d |
../test/libndctl.c:989:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
|
|
|
2eb93d |
989 | unsigned long long expect_table[][2] = {
|
|
|
2eb93d |
| ^~~~~~~~
|
|
|
2eb93d |
|
|
|
2eb93d |
...just move the declaration a few lines up.
|
|
|
2eb93d |
|
|
|
2eb93d |
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
|
|
2eb93d |
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
|
|
|
2eb93d |
Link: https://lore.kernel.org/r/161052209839.1804207.11951679046842122849.stgit@dwillia2-desk3.amr.corp.intel.com
|
|
|
2eb93d |
---
|
|
|
2eb93d |
test/libndctl.c | 12 ++++++------
|
|
|
2eb93d |
1 file changed, 6 insertions(+), 6 deletions(-)
|
|
|
2eb93d |
|
|
|
2eb93d |
diff --git a/test/libndctl.c b/test/libndctl.c
|
|
|
2eb93d |
index 24d72b3..fc65149 100644
|
|
|
2eb93d |
--- a/test/libndctl.c
|
|
|
2eb93d |
+++ b/test/libndctl.c
|
|
|
2eb93d |
@@ -980,12 +980,6 @@ static int check_btt_size(struct ndctl_btt *btt)
|
|
|
2eb93d |
struct ndctl_ctx *ctx = ndctl_btt_get_ctx(btt);
|
|
|
2eb93d |
struct ndctl_test *test = ndctl_get_private_data(ctx);
|
|
|
2eb93d |
struct ndctl_namespace *ndns = ndctl_btt_get_namespace(btt);
|
|
|
2eb93d |
-
|
|
|
2eb93d |
- if (!ndns)
|
|
|
2eb93d |
- return -ENXIO;
|
|
|
2eb93d |
-
|
|
|
2eb93d |
- ns_size = ndctl_namespace_get_size(ndns);
|
|
|
2eb93d |
- sect_size = ndctl_btt_get_sector_size(btt);
|
|
|
2eb93d |
unsigned long long expect_table[][2] = {
|
|
|
2eb93d |
[0] = {
|
|
|
2eb93d |
[0] = 0x11b5400,
|
|
|
2eb93d |
@@ -1001,6 +995,12 @@ static int check_btt_size(struct ndctl_btt *btt)
|
|
|
2eb93d |
},
|
|
|
2eb93d |
};
|
|
|
2eb93d |
|
|
|
2eb93d |
+ if (!ndns)
|
|
|
2eb93d |
+ return -ENXIO;
|
|
|
2eb93d |
+
|
|
|
2eb93d |
+ ns_size = ndctl_namespace_get_size(ndns);
|
|
|
2eb93d |
+ sect_size = ndctl_btt_get_sector_size(btt);
|
|
|
2eb93d |
+
|
|
|
2eb93d |
if (sect_size >= SZ_4K)
|
|
|
2eb93d |
sect_select = 1;
|
|
|
2eb93d |
else if (sect_size >= 512)
|
|
|
2eb93d |
--
|
|
|
2eb93d |
2.27.0
|
|
|
2eb93d |
|