summaryrefslogtreecommitdiffstats
path: root/system/xen/patches/patch-inbuild-ipxe-gcc7-implicit-fallthrough.patch
blob: fe379699b36ee067757dbde0975ec1ad79ced871 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
From 5f85cbb9ee1c00cec81a848a9e871ad5d1e7f53f Mon Sep 17 00:00:00 2001
From: Michael Brown <mcb30@ipxe.org>
Date: Wed, 29 Mar 2017 10:36:03 +0300
Subject: [PATCH] [build] Avoid implicit-fallthrough warnings on GCC 7

Reported-by: Vinson Lee <vlee@freedesktop.org>
Reported-by: Liang Yan <lyan@suse.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
---
 src/arch/x86/image/bzimage.c                 |  2 ++
 src/drivers/infiniband/golan.c               |  1 +
 src/drivers/net/ath/ath9k/ath9k_ar5008_phy.c |  2 ++
 src/drivers/net/ath/ath9k/ath9k_ar9002_phy.c |  1 +
 src/drivers/net/ath/ath9k/ath9k_ar9003_phy.c |  1 +
 src/drivers/net/igbvf/igbvf_vf.c             |  1 +
 src/drivers/net/tg3/tg3_hw.c                 | 12 ++++++++++++
 src/tests/setjmp_test.c                      |  5 +++--
 8 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/src/arch/x86/image/bzimage.c b/src/arch/x86/image/bzimage.c
index e3c4cb83d..51498bf95 100644
--- a/src/arch/x86/image/bzimage.c
+++ b/src/arch/x86/image/bzimage.c
@@ -282,9 +282,11 @@ static int bzimage_parse_cmdline ( struct image *image,
 		case 'G':
 		case 'g':
 			bzimg->mem_limit <<= 10;
+			/* Fall through */
 		case 'M':
 		case 'm':
 			bzimg->mem_limit <<= 10;
+			/* Fall through */
 		case 'K':
 		case 'k':
 			bzimg->mem_limit <<= 10;
diff --git a/src/drivers/infiniband/golan.c b/src/drivers/infiniband/golan.c
index 30eaabab2..61331d4c1 100755
--- a/src/drivers/infiniband/golan.c
+++ b/src/drivers/infiniband/golan.c
@@ -1956,6 +1956,7 @@ static inline void golan_handle_port_event(struct golan *golan, struct golan_eqe
 	case GOLAN_PORT_CHANGE_SUBTYPE_CLIENT_REREG:
 	case GOLAN_PORT_CHANGE_SUBTYPE_ACTIVE:
 		golan_ib_update ( ibdev );
+		/* Fall through */
 	case GOLAN_PORT_CHANGE_SUBTYPE_DOWN:
 	case GOLAN_PORT_CHANGE_SUBTYPE_LID:
 	case GOLAN_PORT_CHANGE_SUBTYPE_PKEY:
diff --git a/src/drivers/net/ath/ath9k/ath9k_ar5008_phy.c b/src/drivers/net/ath/ath9k/ath9k_ar5008_phy.c
index 2b6c133cb..a98e4bb66 100644
--- a/src/drivers/net/ath/ath9k/ath9k_ar5008_phy.c
+++ b/src/drivers/net/ath/ath9k/ath9k_ar5008_phy.c
@@ -640,12 +640,14 @@ static void ar5008_hw_init_chain_masks(struct ath_hw *ah)
 	case 0x5:
 		REG_SET_BIT(ah, AR_PHY_ANALOG_SWAP,
 			    AR_PHY_SWAP_ALT_CHAIN);
+		/* Fall through */
 	case 0x3:
 		if (ah->hw_version.macVersion == AR_SREV_REVISION_5416_10) {
 			REG_WRITE(ah, AR_PHY_RX_CHAINMASK, 0x7);
 			REG_WRITE(ah, AR_PHY_CAL_CHAINMASK, 0x7);
 			break;
 		}
+		/* Fall through */
 	case 0x1:
 	case 0x2:
 	case 0x7:
diff --git a/src/drivers/net/ath/ath9k/ath9k_ar9002_phy.c b/src/drivers/net/ath/ath9k/ath9k_ar9002_phy.c
index 72203ba48..65cfad597 100644
--- a/src/drivers/net/ath/ath9k/ath9k_ar9002_phy.c
+++ b/src/drivers/net/ath/ath9k/ath9k_ar9002_phy.c
@@ -122,6 +122,7 @@ static int ar9002_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan)
 				aModeRefSel = 2;
 			if (aModeRefSel)
 				break;
+			/* Fall through */
 		case 1:
 		default:
 			aModeRefSel = 0;
diff --git a/src/drivers/net/ath/ath9k/ath9k_ar9003_phy.c b/src/drivers/net/ath/ath9k/ath9k_ar9003_phy.c
index 2244b775a..b66358b92 100644
--- a/src/drivers/net/ath/ath9k/ath9k_ar9003_phy.c
+++ b/src/drivers/net/ath/ath9k/ath9k_ar9003_phy.c
@@ -539,6 +539,7 @@ void ar9003_hw_set_chain_masks(struct ath_hw *ah, u8 rx, u8 tx)
 	case 0x5:
 		REG_SET_BIT(ah, AR_PHY_ANALOG_SWAP,
 			    AR_PHY_SWAP_ALT_CHAIN);
+		/* Fall through */
 	case 0x3:
 	case 0x1:
 	case 0x2:
diff --git a/src/drivers/net/igbvf/igbvf_vf.c b/src/drivers/net/igbvf/igbvf_vf.c
index f2dac8be7..f841d5e3d 100644
--- a/src/drivers/net/igbvf/igbvf_vf.c
+++ b/src/drivers/net/igbvf/igbvf_vf.c
@@ -357,6 +357,7 @@ s32 igbvf_promisc_set_vf(struct e1000_hw *hw, enum e1000_promisc_type type)
 		break;
 	case e1000_promisc_enabled:
 		msgbuf |= E1000_VF_SET_PROMISC_MULTICAST;
+		/* Fall through */
 	case e1000_promisc_unicast:
 		msgbuf |= E1000_VF_SET_PROMISC_UNICAST;
 	case e1000_promisc_disabled:
diff --git a/src/drivers/net/tg3/tg3_hw.c b/src/drivers/net/tg3/tg3_hw.c
index 50353cf36..798f8519f 100644
--- a/src/drivers/net/tg3/tg3_hw.c
+++ b/src/drivers/net/tg3/tg3_hw.c
@@ -2518,28 +2518,40 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
 	switch (limit) {
 	case 16:
 		tw32(MAC_RCV_RULE_15,  0); tw32(MAC_RCV_VALUE_15,  0);
+		/* Fall through */
 	case 15:
 		tw32(MAC_RCV_RULE_14,  0); tw32(MAC_RCV_VALUE_14,  0);
+		/* Fall through */
 	case 14:
 		tw32(MAC_RCV_RULE_13,  0); tw32(MAC_RCV_VALUE_13,  0);
+		/* Fall through */
 	case 13:
 		tw32(MAC_RCV_RULE_12,  0); tw32(MAC_RCV_VALUE_12,  0);
+		/* Fall through */
 	case 12:
 		tw32(MAC_RCV_RULE_11,  0); tw32(MAC_RCV_VALUE_11,  0);
+		/* Fall through */
 	case 11:
 		tw32(MAC_RCV_RULE_10,  0); tw32(MAC_RCV_VALUE_10,  0);
+		/* Fall through */
 	case 10:
 		tw32(MAC_RCV_RULE_9,  0); tw32(MAC_RCV_VALUE_9,  0);
+		/* Fall through */
 	case 9:
 		tw32(MAC_RCV_RULE_8,  0); tw32(MAC_RCV_VALUE_8,  0);
+		/* Fall through */
 	case 8:
 		tw32(MAC_RCV_RULE_7,  0); tw32(MAC_RCV_VALUE_7,  0);
+		/* Fall through */
 	case 7:
 		tw32(MAC_RCV_RULE_6,  0); tw32(MAC_RCV_VALUE_6,  0);
+		/* Fall through */
 	case 6:
 		tw32(MAC_RCV_RULE_5,  0); tw32(MAC_RCV_VALUE_5,  0);
+		/* Fall through */
 	case 5:
 		tw32(MAC_RCV_RULE_4,  0); tw32(MAC_RCV_VALUE_4,  0);
+		/* Fall through */
 	case 4:
 		/* tw32(MAC_RCV_RULE_3,  0); tw32(MAC_RCV_VALUE_3,  0); */
 	case 3:
diff --git a/src/tests/setjmp_test.c b/src/tests/setjmp_test.c
index 50ad13f3c..deafcee09 100644
--- a/src/tests/setjmp_test.c
+++ b/src/tests/setjmp_test.c
@@ -111,8 +111,9 @@ static void setjmp_return_ok ( struct setjmp_test *test, int value ) {
  * @v file		Test code file
  * @v line		Test code line
  */
-static void longjmp_okx ( struct setjmp_test *test, int value,
-			  const char *file, unsigned int line ) {
+static void __attribute__ (( noreturn ))
+longjmp_okx ( struct setjmp_test *test, int value,
+	      const char *file, unsigned int line ) {
 
 	/* Record expected value.  A zero passed to longjmp() should
 	 * result in setjmp() returning a value of one.