Skip to contentSkip to conversation

tools/bootconfig: Fix a build error accroding to undefined fallthrough

PATCH In review Masami Hiramatsu 2 participants 4 messages May 13, 2021 – May 20, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/bootconfig: Fix a build error accroding to undefined fallthrough

Since the "fallthrough" is defined only in the kernel, building lib/bootconfig.c as a part of user-space tools causes a build error.

Add a dummy fallthrough to avoid the build error.

Fixes 4c1ca831adb1 ("Revert "lib: Revert use of fallthrough pseudo-keyword in lib/"")
---
 tools/bootconfig/include/linux/bootconfig.h |    4 ++++
 1 file changed, 4 insertions(+)
tools/bootconfig/include/linux/bootconfig.h +4 -0
index 078cbd2ba651..de7f30f99af3 100644
@@ -4,4 +4,8 @@
 
 #include "../../../../include/linux/bootconfig.h"
 
+#ifndef fallthrough
+# define fallthrough
+#endif
+
 #endif
#1 lore raw

Hi Steve,

Can you pick at least this fix since it is a critical bug?

Thank you,

Quoted 27 lines · On Thu, 13 May 2021 12:06:33 +0900 Masami Hiramatsu <[email protected]> wrote:

Since the "fallthrough" is defined only in the kernel, building lib/bootconfig.c as a part of user-space tools causes a build error.

Add a dummy fallthrough to avoid the build error.

Fixes 4c1ca831adb1 ("Revert "lib: Revert use of fallthrough pseudo-keyword in lib/"")
---
 tools/bootconfig/include/linux/bootconfig.h |    4 ++++
 1 file changed, 4 insertions(+)
tools/bootconfig/include/linux/bootconfig.h +4 -0
index 078cbd2ba651..de7f30f99af3 100644
@@ -4,4 +4,8 @@
 
 #include "../../../../include/linux/bootconfig.h"
 
+#ifndef fallthrough
+# define fallthrough
+#endif
+
 #endif
Signature · 1 line
Masami Hiramatsu <[email protected]>
#2 lore raw

Yeah, I have it cued up too. Can it wait till next week?

--Steve

Quoted 38 lines · Masami Hiramatsu

Hi Steve,

Can you pick at least this fix since it is a critical bug?

Thank you,

Quoted 8 lines · On Thu, 13 May 2021 12:06:33 +0900 Masami Hiramatsu <[email protected]> wrote:

Since the "fallthrough" is defined only in the kernel, building lib/bootconfig.c as a part of user-space tools causes a build error.

Add a dummy fallthrough to avoid the build error.

Fixes 4c1ca831adb1 ("Revert "lib: Revert use of fallthrough

pseudo-keyword in lib/"")

Review

Quoted 6 lines
---
 tools/bootconfig/include/linux/bootconfig.h |    4 ++++
 1 file changed, 4 insertions(+)
(quoted diff) +0 -0

b/tools/bootconfig/include/linux/bootconfig.h

Quoted 13 lines

index 078cbd2ba651..de7f30f99af3 100644

tools/bootconfig/include/linux/bootconfig.h +4 -0
@@ -4,4 +4,8 @@
 
 #include "../../../../include/linux/bootconfig.h"
 
+#ifndef fallthrough
+# define fallthrough
+#endif
+
 #endif
Signature · 1 line
Sent from my Android device with K-9 Mail. Please excuse my brevity and top posting.
#3 lore raw
Quoted 1 line · On Thu, 20 May 2021 11:47:13 -0400 Steven Rostedt <[email protected]> wrote:

Yeah, I have it cued up too. Can it wait till next week?

Yes, of course. Sorry for interruption.

Thank you!

Quoted 46 lines

--Steve

Quoted 38 lines · Masami Hiramatsu

Hi Steve,

Can you pick at least this fix since it is a critical bug?

Thank you,

Quoted 8 lines · On Thu, 13 May 2021 12:06:33 +0900 Masami Hiramatsu <[email protected]> wrote:

Since the "fallthrough" is defined only in the kernel, building lib/bootconfig.c as a part of user-space tools causes a build error.

Add a dummy fallthrough to avoid the build error.

Fixes 4c1ca831adb1 ("Revert "lib: Revert use of fallthrough

pseudo-keyword in lib/"")

Review

Quoted 6 lines
---
 tools/bootconfig/include/linux/bootconfig.h |    4 ++++
 1 file changed, 4 insertions(+)
(quoted diff) +0 -0

b/tools/bootconfig/include/linux/bootconfig.h

Quoted 13 lines

index 078cbd2ba651..de7f30f99af3 100644

tools/bootconfig/include/linux/bootconfig.h +4 -0
@@ -4,4 +4,8 @@
 
 #include "../../../../include/linux/bootconfig.h"
 
+#ifndef fallthrough
+# define fallthrough
+#endif
+
 #endif
Signature · 1 line
Sent from my Android device with K-9 Mail. Please excuse my brevity and top posting.
Signature · 1 line
Masami Hiramatsu <[email protected]>