summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/mdadm/files/0005-Add-a-comment-to-indicate-valid-fallthrough.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/mdadm/files/0005-Add-a-comment-to-indicate-valid-fallthrough.patch')
-rw-r--r--meta/recipes-extended/mdadm/files/0005-Add-a-comment-to-indicate-valid-fallthrough.patch36
1 files changed, 16 insertions, 20 deletions
diff --git a/meta/recipes-extended/mdadm/files/0005-Add-a-comment-to-indicate-valid-fallthrough.patch b/meta/recipes-extended/mdadm/files/0005-Add-a-comment-to-indicate-valid-fallthrough.patch
index 3d9d3b9044..d279fddfb6 100644
--- a/meta/recipes-extended/mdadm/files/0005-Add-a-comment-to-indicate-valid-fallthrough.patch
+++ b/meta/recipes-extended/mdadm/files/0005-Add-a-comment-to-indicate-valid-fallthrough.patch
@@ -1,7 +1,7 @@
1From 09014233bf10900f7bd8390b3b64ff82bca45222 Mon Sep 17 00:00:00 2001 1From 0c2c8ae6b3a1fb0f611f9795953a7a6ed06be38d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 19 Apr 2017 12:04:15 -0700 3Date: Wed, 19 Apr 2017 12:04:15 -0700
4Subject: [PATCH 5/5] Add a comment to indicate valid fallthrough 4Subject: [PATCH] Add a comment to indicate valid fallthrough
5 5
6gcc7 warns about code with fallthroughs, this patch adds 6gcc7 warns about code with fallthroughs, this patch adds
7the comment to indicate a valid fallthrough, helps gcc7 7the comment to indicate a valid fallthrough, helps gcc7
@@ -10,9 +10,8 @@ compiler warnings
10This works in cross and native compilation case 10This works in cross and native compilation case
11 11
12Signed-off-by: Khem Raj <raj.khem@gmail.com> 12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14Upstream-Status: Submitted
15 13
14---
16 Grow.c | 4 ++++ 15 Grow.c | 4 ++++
17 bitmap.c | 8 ++++++++ 16 bitmap.c | 8 ++++++++
18 mdadm.c | 2 ++ 17 mdadm.c | 2 ++
@@ -21,10 +20,10 @@ Upstream-Status: Submitted
21 5 files changed, 16 insertions(+) 20 5 files changed, 16 insertions(+)
22 21
23diff --git a/Grow.c b/Grow.c 22diff --git a/Grow.c b/Grow.c
24index 455c5f9..27c73b1 100755 23index 4436a4d..b3116e2 100644
25--- a/Grow.c 24--- a/Grow.c
26+++ b/Grow.c 25+++ b/Grow.c
27@@ -1257,6 +1257,7 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re) 26@@ -1447,6 +1447,7 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re)
28 switch (info->new_level) { 27 switch (info->new_level) {
29 case 4: 28 case 4:
30 delta_parity = 1; 29 delta_parity = 1;
@@ -32,7 +31,7 @@ index 455c5f9..27c73b1 100755
32 case 0: 31 case 0:
33 re->level = 4; 32 re->level = 4;
34 re->before.layout = 0; 33 re->before.layout = 0;
35@@ -1284,10 +1285,12 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re) 34@@ -1474,10 +1475,12 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re)
36 35
37 case 4: 36 case 4:
38 info->array.layout = ALGORITHM_PARITY_N; 37 info->array.layout = ALGORITHM_PARITY_N;
@@ -45,7 +44,7 @@ index 455c5f9..27c73b1 100755
45 case 4: 44 case 4:
46 re->level = info->array.level; 45 re->level = info->array.level;
47 re->before.data_disks = info->array.raid_disks - 1; 46 re->before.data_disks = info->array.raid_disks - 1;
48@@ -1343,6 +1346,7 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re) 47@@ -1533,6 +1536,7 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re)
49 case 4: 48 case 4:
50 case 5: 49 case 5:
51 delta_parity = -1; 50 delta_parity = -1;
@@ -54,7 +53,7 @@ index 455c5f9..27c73b1 100755
54 re->level = 6; 53 re->level = 6;
55 re->before.data_disks = info->array.raid_disks - 2; 54 re->before.data_disks = info->array.raid_disks - 2;
56diff --git a/bitmap.c b/bitmap.c 55diff --git a/bitmap.c b/bitmap.c
57index ccedfd3..a6ff091 100644 56index e38cb96..10af328 100644
58--- a/bitmap.c 57--- a/bitmap.c
59+++ b/bitmap.c 58+++ b/bitmap.c
60@@ -82,13 +82,21 @@ static inline int count_dirty_bits_byte(char byte, int num_bits) 59@@ -82,13 +82,21 @@ static inline int count_dirty_bits_byte(char byte, int num_bits)
@@ -80,10 +79,10 @@ index ccedfd3..a6ff091 100644
80 } 79 }
81 80
82diff --git a/mdadm.c b/mdadm.c 81diff --git a/mdadm.c b/mdadm.c
83index c3a265b..2d06d3b 100644 82index 25a1abd..9843bc5 100644
84--- a/mdadm.c 83--- a/mdadm.c
85+++ b/mdadm.c 84+++ b/mdadm.c
86@@ -148,6 +148,7 @@ int main(int argc, char *argv[]) 85@@ -155,6 +155,7 @@ int main(int argc, char *argv[])
87 mode == CREATE || mode == GROW || 86 mode == CREATE || mode == GROW ||
88 mode == INCREMENTAL || mode == MANAGE) 87 mode == INCREMENTAL || mode == MANAGE)
89 break; /* b means bitmap */ 88 break; /* b means bitmap */
@@ -91,7 +90,7 @@ index c3a265b..2d06d3b 100644
91 case Brief: 90 case Brief:
92 c.brief = 1; 91 c.brief = 1;
93 continue; 92 continue;
94@@ -828,6 +829,7 @@ int main(int argc, char *argv[]) 93@@ -839,6 +840,7 @@ int main(int argc, char *argv[])
95 94
96 case O(INCREMENTAL,NoDegraded): 95 case O(INCREMENTAL,NoDegraded):
97 pr_err("--no-degraded is deprecated in Incremental mode\n"); 96 pr_err("--no-degraded is deprecated in Incremental mode\n");
@@ -100,11 +99,11 @@ index c3a265b..2d06d3b 100644
100 c.runstop = -1; /* --stop isn't allowed for --assemble, 99 c.runstop = -1; /* --stop isn't allowed for --assemble,
101 * so we overload slightly */ 100 * so we overload slightly */
102diff --git a/super-intel.c b/super-intel.c 101diff --git a/super-intel.c b/super-intel.c
103index 4e466ff..00a2925 100644 102index e726987..1bc4b80 100644
104--- a/super-intel.c 103--- a/super-intel.c
105+++ b/super-intel.c 104+++ b/super-intel.c
106@@ -3271,6 +3271,7 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info, 105@@ -3425,6 +3425,7 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info,
107 << SECT_PER_MB_SHIFT; 106
108 } 107 }
109 } 108 }
110+ /* fallthrough */ 109+ /* fallthrough */
@@ -112,10 +111,10 @@ index 4e466ff..00a2925 100644
112 /* we could emulate the checkpointing of 111 /* we could emulate the checkpointing of
113 * 'sync_action=check' migrations, but for now 112 * 'sync_action=check' migrations, but for now
114diff --git a/util.c b/util.c 113diff --git a/util.c b/util.c
115index 32bd909..f2a4d19 100644 114index c26cf5f..61cbe23 100644
116--- a/util.c 115--- a/util.c
117+++ b/util.c 116+++ b/util.c
118@@ -335,6 +335,7 @@ unsigned long long parse_size(char *size) 117@@ -400,6 +400,7 @@ unsigned long long parse_size(char *size)
119 switch (*c) { 118 switch (*c) {
120 case 'K': 119 case 'K':
121 c++; 120 c++;
@@ -123,6 +122,3 @@ index 32bd909..f2a4d19 100644
123 default: 122 default:
124 s *= 2; 123 s *= 2;
125 break; 124 break;
126--
1272.12.2
128