* [Qemu-devel] [PATCH-for-4.1? 0/7] Trivial switch 'fall through' comment fixes for GCC9
@ 2019-07-19 13:14 Philippe Mathieu-Daudé
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 1/7] json: Move switch 'fall through' comment to correct place Philippe Mathieu-Daudé
` (6 more replies)
0 siblings, 7 replies; 24+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-19 13:14 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Laurent Vivier, qemu-block, Corey Minyard,
Peter Maydell, qemu-trivial, Michael Tokarev, Markus Armbruster,
Max Reitz, qemu-ppc, Paolo Bonzini, Philippe Mathieu-Daudé,
David Gibson
Trivial patches, simply rewrite the comment or move it around.
Reported by Stefan here:
https://lists.gnu.org/archive/html/qemu-devel/2019-07/msg01970.html
Regards,
Phil.
Philippe Mathieu-Daudé (7):
json: Move switch 'fall through' comment to correct place
hw/dma/omap_dma: Move switch 'fall through' comment to correct place
hw/block/pflash_cfi02: Rewrite a fall through comment
hw/ipmi: Rewrite a fall through comment
target/ppc: Rewrite a fall through comment
vl: Rewrite a fall through comment
spapr_events: Rewrite a fall through comment
hw/block/pflash_cfi02.c | 2 +-
hw/dma/omap_dma.c | 2 +-
hw/ipmi/ipmi_bmc_extern.c | 3 +--
hw/ppc/spapr_events.c | 2 +-
qobject/json-parser.c | 2 +-
target/ppc/mmu_helper.c | 6 +++---
vl.c | 2 +-
7 files changed, 9 insertions(+), 10 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Qemu-devel] [PATCH-for-4.1? 1/7] json: Move switch 'fall through' comment to correct place
2019-07-19 13:14 [Qemu-devel] [PATCH-for-4.1? 0/7] Trivial switch 'fall through' comment fixes for GCC9 Philippe Mathieu-Daudé
@ 2019-07-19 13:14 ` Philippe Mathieu-Daudé
2019-07-19 15:31 ` Eric Blake
2019-08-21 8:54 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 2/7] hw/dma/omap_dma: " Philippe Mathieu-Daudé
` (5 subsequent siblings)
6 siblings, 2 replies; 24+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-19 13:14 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Laurent Vivier, qemu-block, Corey Minyard,
Peter Maydell, qemu-trivial, Stefan Weil, Michael Tokarev,
Markus Armbruster, Max Reitz, qemu-ppc, Paolo Bonzini,
Philippe Mathieu-Daudé,
David Gibson
Reported by GCC9 when building with CFLAG -Wimplicit-fallthrough=2:
qobject/json-parser.c: In function ‘parse_literal’:
qobject/json-parser.c:492:24: error: this statement may fall through [-Werror=implicit-fallthrough=]
492 | case JSON_INTEGER: {
| ^
qobject/json-parser.c:524:5: note: here
524 | case JSON_FLOAT:
| ^~~~
Correctly place the 'fall through' comment.
Reported-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
qobject/json-parser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qobject/json-parser.c b/qobject/json-parser.c
index 7d23e12e33..d083810d37 100644
--- a/qobject/json-parser.c
+++ b/qobject/json-parser.c
@@ -519,8 +519,8 @@ static QObject *parse_literal(JSONParserContext *ctxt)
}
assert(ret == -ERANGE);
}
- /* fall through to JSON_FLOAT */
}
+ /* fall through to JSON_FLOAT */
case JSON_FLOAT:
/* FIXME dependent on locale; a pervasive issue in QEMU */
/* FIXME our lexer matches RFC 8259 in forbidding Inf or NaN,
--
2.20.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [Qemu-devel] [PATCH-for-4.1? 2/7] hw/dma/omap_dma: Move switch 'fall through' comment to correct place
2019-07-19 13:14 [Qemu-devel] [PATCH-for-4.1? 0/7] Trivial switch 'fall through' comment fixes for GCC9 Philippe Mathieu-Daudé
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 1/7] json: Move switch 'fall through' comment to correct place Philippe Mathieu-Daudé
@ 2019-07-19 13:14 ` Philippe Mathieu-Daudé
2019-07-19 13:27 ` Peter Maydell
2019-08-21 8:55 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1 3/7] hw/block/pflash_cfi02: Rewrite a fall through comment Philippe Mathieu-Daudé
` (4 subsequent siblings)
6 siblings, 2 replies; 24+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-19 13:14 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Laurent Vivier, qemu-block, Corey Minyard,
Peter Maydell, qemu-trivial, Stefan Weil, Michael Tokarev,
Markus Armbruster, Max Reitz, qemu-ppc, Paolo Bonzini,
Philippe Mathieu-Daudé,
David Gibson
Reported by GCC9 when building with CFLAG -Wimplicit-fallthrough=2:
CC hw/dma/omap_dma.o
hw/dma/omap_dma.c: In function ‘omap_dma_write’:
hw/dma/omap_dma.c:1532:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
1532 | if (s->model <= omap_dma_3_1)
| ^
hw/dma/omap_dma.c:1534:5: note: here
1534 | case 0x400:
| ^~~~
cc1: all warnings being treated as errors
Correctly place the 'fall through' comment.
Reported-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/dma/omap_dma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/dma/omap_dma.c b/hw/dma/omap_dma.c
index eab83c5c3a..6677237d42 100644
--- a/hw/dma/omap_dma.c
+++ b/hw/dma/omap_dma.c
@@ -1531,8 +1531,8 @@ static void omap_dma_write(void *opaque, hwaddr addr,
case 0x404 ... 0x4fe:
if (s->model <= omap_dma_3_1)
break;
+ /* fall through */
case 0x400:
- /* Fall through. */
if (omap_dma_sys_write(s, addr, value))
break;
return;
--
2.20.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [Qemu-devel] [PATCH-for-4.1 3/7] hw/block/pflash_cfi02: Rewrite a fall through comment
2019-07-19 13:14 [Qemu-devel] [PATCH-for-4.1? 0/7] Trivial switch 'fall through' comment fixes for GCC9 Philippe Mathieu-Daudé
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 1/7] json: Move switch 'fall through' comment to correct place Philippe Mathieu-Daudé
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 2/7] hw/dma/omap_dma: " Philippe Mathieu-Daudé
@ 2019-07-19 13:14 ` Philippe Mathieu-Daudé
2019-07-19 13:27 ` Peter Maydell
2019-07-22 11:43 ` Philippe Mathieu-Daudé
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 4/7] hw/ipmi: " Philippe Mathieu-Daudé
` (3 subsequent siblings)
6 siblings, 2 replies; 24+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-19 13:14 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Laurent Vivier, qemu-block, Corey Minyard,
Peter Maydell, qemu-trivial, Stefan Weil, Michael Tokarev,
Markus Armbruster, Max Reitz, qemu-ppc, Paolo Bonzini,
Philippe Mathieu-Daudé,
David Gibson
GCC9 is confused by this comment when building with CFLAG
-Wimplicit-fallthrough=2:
hw/block/pflash_cfi02.c: In function ‘pflash_write’:
hw/block/pflash_cfi02.c:574:16: error: this statement may fall through [-Werror=implicit-fallthrough=]
574 | if (boff == 0x55 && cmd == 0x98) {
| ^
hw/block/pflash_cfi02.c:581:9: note: here
581 | default:
| ^~~~~~~
cc1: all warnings being treated as errors
Rewrite the comment using 'fall through' which is recognized by
GCC and static analyzers.
Reported-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/block/pflash_cfi02.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c
index f68837a449..42886f6af5 100644
--- a/hw/block/pflash_cfi02.c
+++ b/hw/block/pflash_cfi02.c
@@ -577,7 +577,7 @@ static void pflash_write(void *opaque, hwaddr offset, uint64_t value,
pfl->cmd = 0x98;
return;
}
- /* No break here */
+ /* fall through */
default:
DPRINTF("%s: invalid write for command %02x\n",
__func__, pfl->cmd);
--
2.20.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [Qemu-devel] [PATCH-for-4.1? 4/7] hw/ipmi: Rewrite a fall through comment
2019-07-19 13:14 [Qemu-devel] [PATCH-for-4.1? 0/7] Trivial switch 'fall through' comment fixes for GCC9 Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1 3/7] hw/block/pflash_cfi02: Rewrite a fall through comment Philippe Mathieu-Daudé
@ 2019-07-19 13:14 ` Philippe Mathieu-Daudé
2019-07-21 2:10 ` Corey Minyard
2019-08-21 8:56 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 5/7] target/ppc: " Philippe Mathieu-Daudé
` (2 subsequent siblings)
6 siblings, 2 replies; 24+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-19 13:14 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Laurent Vivier, qemu-block, Corey Minyard,
Peter Maydell, qemu-trivial, Stefan Weil, Michael Tokarev,
Markus Armbruster, Max Reitz, qemu-ppc, Paolo Bonzini,
Philippe Mathieu-Daudé,
David Gibson
GCC9 is confused by this comment when building with CFLAG
-Wimplicit-fallthrough=2:
hw/ipmi/ipmi_bmc_extern.c: In function ‘addchar’:
hw/ipmi/ipmi_bmc_extern.c:178:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
178 | ch |= 0x10;
| ~~~^~~~~~~
hw/ipmi/ipmi_bmc_extern.c:181:5: note: here
181 | default:
| ^~~~~~~
cc1: all warnings being treated as errors
make: *** [rules.mak:69: hw/ipmi/ipmi_bmc_extern.o] Error 1
Rewrite the comment using 'fall through' which is recognized by
GCC and static analyzers.
Reported-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/ipmi/ipmi_bmc_extern.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c
index c0a8dac346..d4cbd210c4 100644
--- a/hw/ipmi/ipmi_bmc_extern.c
+++ b/hw/ipmi/ipmi_bmc_extern.c
@@ -176,8 +176,7 @@ static void addchar(IPMIBmcExtern *ibe, unsigned char ch)
ibe->outbuf[ibe->outlen] = VM_ESCAPE_CHAR;
ibe->outlen++;
ch |= 0x10;
- /* No break */
-
+ /* fall through */
default:
ibe->outbuf[ibe->outlen] = ch;
ibe->outlen++;
--
2.20.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [Qemu-devel] [PATCH-for-4.1? 5/7] target/ppc: Rewrite a fall through comment
2019-07-19 13:14 [Qemu-devel] [PATCH-for-4.1? 0/7] Trivial switch 'fall through' comment fixes for GCC9 Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 4/7] hw/ipmi: " Philippe Mathieu-Daudé
@ 2019-07-19 13:14 ` Philippe Mathieu-Daudé
2019-07-19 14:20 ` David Gibson
2019-08-21 8:57 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 6/7] vl: " Philippe Mathieu-Daudé
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 7/7] spapr_events: " Philippe Mathieu-Daudé
6 siblings, 2 replies; 24+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-19 13:14 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Laurent Vivier, qemu-block, Corey Minyard,
Peter Maydell, qemu-trivial, Stefan Weil, Michael Tokarev,
Markus Armbruster, Max Reitz, qemu-ppc, Paolo Bonzini,
Philippe Mathieu-Daudé,
David Gibson
GCC9 is confused by this comment when building with CFLAG
-Wimplicit-fallthrough=2:
target/ppc/mmu_helper.c: In function ‘dump_mmu’:
target/ppc/mmu_helper.c:1349:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
1349 | if (ppc64_v3_radix(env_archcpu(env))) {
| ^
target/ppc/mmu_helper.c:1356:5: note: here
1356 | default:
| ^~~~~~~
cc1: all warnings being treated as errors
Rewrite the comment using 'fall through' which is recognized by
GCC and static analyzers.
Reported-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
target/ppc/mmu_helper.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/target/ppc/mmu_helper.c b/target/ppc/mmu_helper.c
index 261a8fe707..862824b073 100644
--- a/target/ppc/mmu_helper.c
+++ b/target/ppc/mmu_helper.c
@@ -98,7 +98,7 @@ static int pp_check(int key, int pp, int nx)
case 0x1:
case 0x2:
access |= PAGE_WRITE;
- /* No break here */
+ /* fall through */
case 0x3:
access |= PAGE_READ;
break;
@@ -706,7 +706,7 @@ static int mmu40x_get_physical_address(CPUPPCState *env, mmu_ctx_t *ctx,
if (pr != 0) {
goto check_perms;
}
- /* No break here */
+ /* fall through */
case 0x3:
/* All accesses granted */
ctx->prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
@@ -720,7 +720,7 @@ static int mmu40x_get_physical_address(CPUPPCState *env, mmu_ctx_t *ctx,
ret = -2;
break;
}
- /* No break here */
+ /* fall through */
case 0x1:
check_perms:
/* Check from TLB entry */
--
2.20.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [Qemu-devel] [PATCH-for-4.1? 6/7] vl: Rewrite a fall through comment
2019-07-19 13:14 [Qemu-devel] [PATCH-for-4.1? 0/7] Trivial switch 'fall through' comment fixes for GCC9 Philippe Mathieu-Daudé
` (4 preceding siblings ...)
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 5/7] target/ppc: " Philippe Mathieu-Daudé
@ 2019-07-19 13:14 ` Philippe Mathieu-Daudé
2019-07-25 0:28 ` [Qemu-devel] [Qemu-block] " John Snow
2019-08-21 8:58 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 7/7] spapr_events: " Philippe Mathieu-Daudé
6 siblings, 2 replies; 24+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-19 13:14 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Laurent Vivier, qemu-block, Corey Minyard,
Peter Maydell, qemu-trivial, Stefan Weil, Michael Tokarev,
Markus Armbruster, Max Reitz, qemu-ppc, Paolo Bonzini,
Philippe Mathieu-Daudé,
David Gibson
GCC9 is confused by this comment when building with CFLAG
-Wimplicit-fallthrough=2:
vl.c: In function ‘qemu_ref_timedate’:
vl.c:773:15: error: this statement may fall through [-Werror=implicit-fallthrough=]
773 | value -= rtc_realtime_clock_offset;
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
vl.c:775:5: note: here
775 | case QEMU_CLOCK_VIRTUAL:
| ^~~~
cc1: all warnings being treated as errors
Rewrite the comment using 'fall through' which is recognized by
GCC and static analyzers.
Reported-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
vl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vl.c b/vl.c
index a5808f9a02..f5cf71e3b4 100644
--- a/vl.c
+++ b/vl.c
@@ -771,7 +771,7 @@ static time_t qemu_ref_timedate(QEMUClockType clock)
switch (clock) {
case QEMU_CLOCK_REALTIME:
value -= rtc_realtime_clock_offset;
- /* no break */
+ /* fall through */
case QEMU_CLOCK_VIRTUAL:
value += rtc_ref_start_datetime;
break;
--
2.20.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [Qemu-devel] [PATCH-for-4.1? 7/7] spapr_events: Rewrite a fall through comment
2019-07-19 13:14 [Qemu-devel] [PATCH-for-4.1? 0/7] Trivial switch 'fall through' comment fixes for GCC9 Philippe Mathieu-Daudé
` (5 preceding siblings ...)
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 6/7] vl: " Philippe Mathieu-Daudé
@ 2019-07-19 13:14 ` Philippe Mathieu-Daudé
2019-07-19 14:20 ` David Gibson
2019-08-21 8:59 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
6 siblings, 2 replies; 24+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-19 13:14 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Laurent Vivier, qemu-block, Corey Minyard,
Peter Maydell, qemu-trivial, Stefan Weil, Michael Tokarev,
Markus Armbruster, Max Reitz, qemu-ppc, Paolo Bonzini,
Philippe Mathieu-Daudé,
David Gibson
GCC9 is confused by this comment when building with CFLAG
-Wimplicit-fallthrough=2:
CC ppc64-softmmu/hw/ppc/spapr_rtc.o
hw/ppc/spapr_events.c: In function ‘rtas_event_log_to_source’:
hw/ppc/spapr_events.c:312:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
312 | if (spapr_ovec_test(spapr->ov5_cas, OV5_HP_EVT)) {
| ^
hw/ppc/spapr_events.c:317:5: note: here
317 | case RTAS_LOG_TYPE_EPOW:
| ^~~~
cc1: all warnings being treated as errors
Rewrite the comment using 'fall through' which is recognized by
GCC and static analyzers.
Reported-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/ppc/spapr_events.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/ppc/spapr_events.c b/hw/ppc/spapr_events.c
index ae0f093f59..0a98894ad6 100644
--- a/hw/ppc/spapr_events.c
+++ b/hw/ppc/spapr_events.c
@@ -313,7 +313,7 @@ rtas_event_log_to_source(SpaprMachineState *spapr, int log_type)
g_assert(source->enabled);
break;
}
- /* fall back to epow for legacy hotplug interrupt source */
+ /* fall through back to epow for legacy hotplug interrupt source */
case RTAS_LOG_TYPE_EPOW:
source = spapr_event_sources_get_source(spapr->event_sources,
EVENT_CLASS_EPOW);
--
2.20.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [PATCH-for-4.1? 2/7] hw/dma/omap_dma: Move switch 'fall through' comment to correct place
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 2/7] hw/dma/omap_dma: " Philippe Mathieu-Daudé
@ 2019-07-19 13:27 ` Peter Maydell
2019-08-21 8:55 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
1 sibling, 0 replies; 24+ messages in thread
From: Peter Maydell @ 2019-07-19 13:27 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Kevin Wolf, Laurent Vivier, Corey Minyard, Qemu-block,
QEMU Trivial, Stefan Weil, Michael Tokarev, QEMU Developers,
Markus Armbruster, qemu-ppc, Paolo Bonzini, Max Reitz,
David Gibson
On Fri, 19 Jul 2019 at 14:14, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> Reported by GCC9 when building with CFLAG -Wimplicit-fallthrough=2:
>
> CC hw/dma/omap_dma.o
> hw/dma/omap_dma.c: In function ‘omap_dma_write’:
> hw/dma/omap_dma.c:1532:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
> 1532 | if (s->model <= omap_dma_3_1)
> | ^
> hw/dma/omap_dma.c:1534:5: note: here
> 1534 | case 0x400:
> | ^~~~
> cc1: all warnings being treated as errors
>
> Correctly place the 'fall through' comment.
>
> Reported-by: Stefan Weil <sw@weilnetz.de>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> hw/dma/omap_dma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/dma/omap_dma.c b/hw/dma/omap_dma.c
> index eab83c5c3a..6677237d42 100644
> --- a/hw/dma/omap_dma.c
> +++ b/hw/dma/omap_dma.c
> @@ -1531,8 +1531,8 @@ static void omap_dma_write(void *opaque, hwaddr addr,
> case 0x404 ... 0x4fe:
> if (s->model <= omap_dma_3_1)
> break;
> + /* fall through */
> case 0x400:
> - /* Fall through. */
> if (omap_dma_sys_write(s, addr, value))
> break;
> return;
> -
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [PATCH-for-4.1 3/7] hw/block/pflash_cfi02: Rewrite a fall through comment
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1 3/7] hw/block/pflash_cfi02: Rewrite a fall through comment Philippe Mathieu-Daudé
@ 2019-07-19 13:27 ` Peter Maydell
2019-07-22 11:43 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 24+ messages in thread
From: Peter Maydell @ 2019-07-19 13:27 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Kevin Wolf, Laurent Vivier, Corey Minyard, Qemu-block,
QEMU Trivial, Stefan Weil, Michael Tokarev, QEMU Developers,
Markus Armbruster, qemu-ppc, Paolo Bonzini, Max Reitz,
David Gibson
On Fri, 19 Jul 2019 at 14:14, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> GCC9 is confused by this comment when building with CFLAG
> -Wimplicit-fallthrough=2:
>
> hw/block/pflash_cfi02.c: In function ‘pflash_write’:
> hw/block/pflash_cfi02.c:574:16: error: this statement may fall through [-Werror=implicit-fallthrough=]
> 574 | if (boff == 0x55 && cmd == 0x98) {
> | ^
> hw/block/pflash_cfi02.c:581:9: note: here
> 581 | default:
> | ^~~~~~~
> cc1: all warnings being treated as errors
>
> Rewrite the comment using 'fall through' which is recognized by
> GCC and static analyzers.
>
> Reported-by: Stefan Weil <sw@weilnetz.de>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> hw/block/pflash_cfi02.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c
> index f68837a449..42886f6af5 100644
> --- a/hw/block/pflash_cfi02.c
> +++ b/hw/block/pflash_cfi02.c
> @@ -577,7 +577,7 @@ static void pflash_write(void *opaque, hwaddr offset, uint64_t value,
> pfl->cmd = 0x98;
> return;
> }
> - /* No break here */
> + /* fall through */
> default:
> DPRINTF("%s: invalid write for command %02x\n",
> __func__, pfl->cmd);
> --
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [PATCH-for-4.1? 5/7] target/ppc: Rewrite a fall through comment
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 5/7] target/ppc: " Philippe Mathieu-Daudé
@ 2019-07-19 14:20 ` David Gibson
2019-08-21 8:57 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
1 sibling, 0 replies; 24+ messages in thread
From: David Gibson @ 2019-07-19 14:20 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Kevin Wolf, Peter Maydell, qemu-block, Corey Minyard,
qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel,
Markus Armbruster, qemu-ppc, Paolo Bonzini, Max Reitz,
Laurent Vivier
[-- Attachment #1: Type: text/plain, Size: 2322 bytes --]
On Fri, Jul 19, 2019 at 03:14:23PM +0200, Philippe Mathieu-Daudé wrote:
> GCC9 is confused by this comment when building with CFLAG
> -Wimplicit-fallthrough=2:
>
> target/ppc/mmu_helper.c: In function ‘dump_mmu’:
> target/ppc/mmu_helper.c:1349:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
> 1349 | if (ppc64_v3_radix(env_archcpu(env))) {
> | ^
> target/ppc/mmu_helper.c:1356:5: note: here
> 1356 | default:
> | ^~~~~~~
> cc1: all warnings being treated as errors
>
> Rewrite the comment using 'fall through' which is recognized by
> GCC and static analyzers.
>
> Reported-by: Stefan Weil <sw@weilnetz.de>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> target/ppc/mmu_helper.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/target/ppc/mmu_helper.c b/target/ppc/mmu_helper.c
> index 261a8fe707..862824b073 100644
> --- a/target/ppc/mmu_helper.c
> +++ b/target/ppc/mmu_helper.c
> @@ -98,7 +98,7 @@ static int pp_check(int key, int pp, int nx)
> case 0x1:
> case 0x2:
> access |= PAGE_WRITE;
> - /* No break here */
> + /* fall through */
> case 0x3:
> access |= PAGE_READ;
> break;
> @@ -706,7 +706,7 @@ static int mmu40x_get_physical_address(CPUPPCState *env, mmu_ctx_t *ctx,
> if (pr != 0) {
> goto check_perms;
> }
> - /* No break here */
> + /* fall through */
> case 0x3:
> /* All accesses granted */
> ctx->prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
> @@ -720,7 +720,7 @@ static int mmu40x_get_physical_address(CPUPPCState *env, mmu_ctx_t *ctx,
> ret = -2;
> break;
> }
> - /* No break here */
> + /* fall through */
> case 0x1:
> check_perms:
> /* Check from TLB entry */
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [PATCH-for-4.1? 7/7] spapr_events: Rewrite a fall through comment
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 7/7] spapr_events: " Philippe Mathieu-Daudé
@ 2019-07-19 14:20 ` David Gibson
2019-08-21 8:59 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
1 sibling, 0 replies; 24+ messages in thread
From: David Gibson @ 2019-07-19 14:20 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Kevin Wolf, Peter Maydell, qemu-block, Corey Minyard,
qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel,
Markus Armbruster, qemu-ppc, Paolo Bonzini, Max Reitz,
Laurent Vivier
[-- Attachment #1: Type: text/plain, Size: 1868 bytes --]
On Fri, Jul 19, 2019 at 03:14:25PM +0200, Philippe Mathieu-Daudé wrote:
> GCC9 is confused by this comment when building with CFLAG
> -Wimplicit-fallthrough=2:
>
> CC ppc64-softmmu/hw/ppc/spapr_rtc.o
> hw/ppc/spapr_events.c: In function ‘rtas_event_log_to_source’:
> hw/ppc/spapr_events.c:312:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
> 312 | if (spapr_ovec_test(spapr->ov5_cas, OV5_HP_EVT)) {
> | ^
> hw/ppc/spapr_events.c:317:5: note: here
> 317 | case RTAS_LOG_TYPE_EPOW:
> | ^~~~
> cc1: all warnings being treated as errors
>
> Rewrite the comment using 'fall through' which is recognized by
> GCC and static analyzers.
>
> Reported-by: Stefan Weil <sw@weilnetz.de>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> hw/ppc/spapr_events.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/ppc/spapr_events.c b/hw/ppc/spapr_events.c
> index ae0f093f59..0a98894ad6 100644
> --- a/hw/ppc/spapr_events.c
> +++ b/hw/ppc/spapr_events.c
> @@ -313,7 +313,7 @@ rtas_event_log_to_source(SpaprMachineState *spapr, int log_type)
> g_assert(source->enabled);
> break;
> }
> - /* fall back to epow for legacy hotplug interrupt source */
> + /* fall through back to epow for legacy hotplug interrupt source */
> case RTAS_LOG_TYPE_EPOW:
> source = spapr_event_sources_get_source(spapr->event_sources,
> EVENT_CLASS_EPOW);
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [PATCH-for-4.1? 1/7] json: Move switch 'fall through' comment to correct place
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 1/7] json: Move switch 'fall through' comment to correct place Philippe Mathieu-Daudé
@ 2019-07-19 15:31 ` Eric Blake
2019-08-21 8:54 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
1 sibling, 0 replies; 24+ messages in thread
From: Eric Blake @ 2019-07-19 15:31 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Kevin Wolf, Peter Maydell, Corey Minyard, qemu-block,
qemu-trivial, Stefan Weil, Michael Tokarev, Laurent Vivier,
Markus Armbruster, qemu-ppc, Paolo Bonzini, Max Reitz,
David Gibson
[-- Attachment #1.1: Type: text/plain, Size: 902 bytes --]
On 7/19/19 8:14 AM, Philippe Mathieu-Daudé wrote:
> Reported by GCC9 when building with CFLAG -Wimplicit-fallthrough=2:
>
> qobject/json-parser.c: In function ‘parse_literal’:
> qobject/json-parser.c:492:24: error: this statement may fall through [-Werror=implicit-fallthrough=]
> 492 | case JSON_INTEGER: {
> | ^
> qobject/json-parser.c:524:5: note: here
> 524 | case JSON_FLOAT:
> | ^~~~
>
> Correctly place the 'fall through' comment.
>
> Reported-by: Stefan Weil <sw@weilnetz.de>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> qobject/json-parser.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [PATCH-for-4.1? 4/7] hw/ipmi: Rewrite a fall through comment
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 4/7] hw/ipmi: " Philippe Mathieu-Daudé
@ 2019-07-21 2:10 ` Corey Minyard
2019-08-21 8:56 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
1 sibling, 0 replies; 24+ messages in thread
From: Corey Minyard @ 2019-07-21 2:10 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Kevin Wolf, Laurent Vivier, qemu-block, Peter Maydell,
qemu-trivial, Stefan Weil, Michael Tokarev, qemu-devel,
Markus Armbruster, qemu-ppc, Paolo Bonzini, Max Reitz,
David Gibson
On Fri, Jul 19, 2019 at 03:14:22PM +0200, Philippe Mathieu-Daudé wrote:
> GCC9 is confused by this comment when building with CFLAG
> -Wimplicit-fallthrough=2:
>
> hw/ipmi/ipmi_bmc_extern.c: In function ‘addchar’:
> hw/ipmi/ipmi_bmc_extern.c:178:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
> 178 | ch |= 0x10;
> | ~~~^~~~~~~
> hw/ipmi/ipmi_bmc_extern.c:181:5: note: here
> 181 | default:
> | ^~~~~~~
> cc1: all warnings being treated as errors
> make: *** [rules.mak:69: hw/ipmi/ipmi_bmc_extern.o] Error 1
>
> Rewrite the comment using 'fall through' which is recognized by
> GCC and static analyzers.
>
> Reported-by: Stefan Weil <sw@weilnetz.de>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> hw/ipmi/ipmi_bmc_extern.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c
> index c0a8dac346..d4cbd210c4 100644
> --- a/hw/ipmi/ipmi_bmc_extern.c
> +++ b/hw/ipmi/ipmi_bmc_extern.c
> @@ -176,8 +176,7 @@ static void addchar(IPMIBmcExtern *ibe, unsigned char ch)
> ibe->outbuf[ibe->outlen] = VM_ESCAPE_CHAR;
> ibe->outlen++;
> ch |= 0x10;
> - /* No break */
> -
> + /* fall through */
> default:
> ibe->outbuf[ibe->outlen] = ch;
> ibe->outlen++;
> --
> 2.20.1
>
Well, whatever, this is fine.
Acked-by: Corey Minyard <cminyard@mvista.com>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [PATCH-for-4.1 3/7] hw/block/pflash_cfi02: Rewrite a fall through comment
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1 3/7] hw/block/pflash_cfi02: Rewrite a fall through comment Philippe Mathieu-Daudé
2019-07-19 13:27 ` Peter Maydell
@ 2019-07-22 11:43 ` Philippe Mathieu-Daudé
2019-07-25 0:27 ` [Qemu-devel] [Qemu-block] " John Snow
1 sibling, 1 reply; 24+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-22 11:43 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Laurent Vivier, qemu-block, Corey Minyard,
Peter Maydell, qemu-trivial, Stefan Weil, Michael Tokarev,
Markus Armbruster, Max Reitz, qemu-ppc, Paolo Bonzini,
David Gibson
On 7/19/19 3:14 PM, Philippe Mathieu-Daudé wrote:
> GCC9 is confused by this comment when building with CFLAG
> -Wimplicit-fallthrough=2:
>
> hw/block/pflash_cfi02.c: In function ‘pflash_write’:
> hw/block/pflash_cfi02.c:574:16: error: this statement may fall through [-Werror=implicit-fallthrough=]
> 574 | if (boff == 0x55 && cmd == 0x98) {
> | ^
> hw/block/pflash_cfi02.c:581:9: note: here
> 581 | default:
> | ^~~~~~~
> cc1: all warnings being treated as errors
>
> Rewrite the comment using 'fall through' which is recognized by
> GCC and static analyzers.
>
> Reported-by: Stefan Weil <sw@weilnetz.de>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> hw/block/pflash_cfi02.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c
> index f68837a449..42886f6af5 100644
> --- a/hw/block/pflash_cfi02.c
> +++ b/hw/block/pflash_cfi02.c
> @@ -577,7 +577,7 @@ static void pflash_write(void *opaque, hwaddr offset, uint64_t value,
> pfl->cmd = 0x98;
> return;
> }
> - /* No break here */
> + /* fall through */
> default:
> DPRINTF("%s: invalid write for command %02x\n",
> __func__, pfl->cmd);
>
Queued to pflash/next, thanks.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [Qemu-block] [PATCH-for-4.1 3/7] hw/block/pflash_cfi02: Rewrite a fall through comment
2019-07-22 11:43 ` Philippe Mathieu-Daudé
@ 2019-07-25 0:27 ` John Snow
2019-07-25 10:59 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 24+ messages in thread
From: John Snow @ 2019-07-25 0:27 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Kevin Wolf, Peter Maydell, Corey Minyard, qemu-block,
qemu-trivial, Stefan Weil, Michael Tokarev, Laurent Vivier,
Markus Armbruster, qemu-ppc, Paolo Bonzini, Max Reitz,
David Gibson
On 7/22/19 7:43 AM, Philippe Mathieu-Daudé wrote:
> On 7/19/19 3:14 PM, Philippe Mathieu-Daudé wrote:
>> GCC9 is confused by this comment when building with CFLAG
>> -Wimplicit-fallthrough=2:
>>
>> hw/block/pflash_cfi02.c: In function ‘pflash_write’:
>> hw/block/pflash_cfi02.c:574:16: error: this statement may fall through [-Werror=implicit-fallthrough=]
>> 574 | if (boff == 0x55 && cmd == 0x98) {
>> | ^
>> hw/block/pflash_cfi02.c:581:9: note: here
>> 581 | default:
>> | ^~~~~~~
>> cc1: all warnings being treated as errors
>>
>> Rewrite the comment using 'fall through' which is recognized by
>> GCC and static analyzers.
>>
>> Reported-by: Stefan Weil <sw@weilnetz.de>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>> hw/block/pflash_cfi02.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c
>> index f68837a449..42886f6af5 100644
>> --- a/hw/block/pflash_cfi02.c
>> +++ b/hw/block/pflash_cfi02.c
>> @@ -577,7 +577,7 @@ static void pflash_write(void *opaque, hwaddr offset, uint64_t value,
>> pfl->cmd = 0x98;
>> return;
>> }
>> - /* No break here */
>> + /* fall through */
>> default:
>> DPRINTF("%s: invalid write for command %02x\n",
>> __func__, pfl->cmd);
>>
>
> Queued to pflash/next, thanks.
>
Are you queueing everything or just this one patch? It would be a little
inconvenient to split a series up like that.
(Most other maintainers will, I believe, expect that with an "ACK" or
similar that someone else will stage the series.)
--js
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [Qemu-block] [PATCH-for-4.1? 6/7] vl: Rewrite a fall through comment
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 6/7] vl: " Philippe Mathieu-Daudé
@ 2019-07-25 0:28 ` John Snow
2019-08-21 8:58 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
1 sibling, 0 replies; 24+ messages in thread
From: John Snow @ 2019-07-25 0:28 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Kevin Wolf, Peter Maydell, Corey Minyard, qemu-block,
qemu-trivial, Stefan Weil, Michael Tokarev, Laurent Vivier,
Markus Armbruster, qemu-ppc, Paolo Bonzini, Max Reitz,
David Gibson
On 7/19/19 9:14 AM, Philippe Mathieu-Daudé wrote:
> GCC9 is confused by this comment when building with CFLAG
> -Wimplicit-fallthrough=2:
>
> vl.c: In function ‘qemu_ref_timedate’:
> vl.c:773:15: error: this statement may fall through [-Werror=implicit-fallthrough=]
> 773 | value -= rtc_realtime_clock_offset;
> | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> vl.c:775:5: note: here
> 775 | case QEMU_CLOCK_VIRTUAL:
> | ^~~~
> cc1: all warnings being treated as errors
>
> Rewrite the comment using 'fall through' which is recognized by
> GCC and static analyzers.
>
> Reported-by: Stefan Weil <sw@weilnetz.de>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> vl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/vl.c b/vl.c
> index a5808f9a02..f5cf71e3b4 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -771,7 +771,7 @@ static time_t qemu_ref_timedate(QEMUClockType clock)
> switch (clock) {
> case QEMU_CLOCK_REALTIME:
> value -= rtc_realtime_clock_offset;
> - /* no break */
> + /* fall through */
> case QEMU_CLOCK_VIRTUAL:
> value += rtc_ref_start_datetime;
> break;
>
Reviewed-by: John Snow <jsnow@redhat.com>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [Qemu-block] [PATCH-for-4.1 3/7] hw/block/pflash_cfi02: Rewrite a fall through comment
2019-07-25 0:27 ` [Qemu-devel] [Qemu-block] " John Snow
@ 2019-07-25 10:59 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 24+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-25 10:59 UTC (permalink / raw)
To: John Snow, qemu-devel
Cc: Kevin Wolf, Peter Maydell, Corey Minyard, qemu-block,
qemu-trivial, Stefan Weil, Michael Tokarev, Laurent Vivier,
Markus Armbruster, qemu-ppc, Paolo Bonzini, Max Reitz,
David Gibson
On 7/25/19 2:27 AM, John Snow wrote:
> On 7/22/19 7:43 AM, Philippe Mathieu-Daudé wrote:
>> On 7/19/19 3:14 PM, Philippe Mathieu-Daudé wrote:
>>> GCC9 is confused by this comment when building with CFLAG
>>> -Wimplicit-fallthrough=2:
>>>
>>> hw/block/pflash_cfi02.c: In function ‘pflash_write’:
>>> hw/block/pflash_cfi02.c:574:16: error: this statement may fall through [-Werror=implicit-fallthrough=]
>>> 574 | if (boff == 0x55 && cmd == 0x98) {
>>> | ^
>>> hw/block/pflash_cfi02.c:581:9: note: here
>>> 581 | default:
>>> | ^~~~~~~
>>> cc1: all warnings being treated as errors
>>>
>>> Rewrite the comment using 'fall through' which is recognized by
>>> GCC and static analyzers.
>>>
>>> Reported-by: Stefan Weil <sw@weilnetz.de>
>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>> ---
>>> hw/block/pflash_cfi02.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c
>>> index f68837a449..42886f6af5 100644
>>> --- a/hw/block/pflash_cfi02.c
>>> +++ b/hw/block/pflash_cfi02.c
>>> @@ -577,7 +577,7 @@ static void pflash_write(void *opaque, hwaddr offset, uint64_t value,
>>> pfl->cmd = 0x98;
>>> return;
>>> }
>>> - /* No break here */
>>> + /* fall through */
>>> default:
>>> DPRINTF("%s: invalid write for command %02x\n",
>>> __func__, pfl->cmd);
>>>
>>
>> Queued to pflash/next, thanks.
>>
>
> Are you queueing everything or just this one patch? It would be a little
> inconvenient to split a series up like that.
Oops I simply queued this particular one.
> (Most other maintainers will, I believe, expect that with an "ACK" or
> similar that someone else will stage the series.)
I thought these are not critical bugfixes for 4.1, but since I had to do
a pull request for pflash, I could include it. (I already noticed
maintainers queueing particular patches from cleanup series).
Next time I'll ping/wait.
Regards,
Phil.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH-for-4.1? 1/7] json: Move switch 'fall through' comment to correct place
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 1/7] json: Move switch 'fall through' comment to correct place Philippe Mathieu-Daudé
2019-07-19 15:31 ` Eric Blake
@ 2019-08-21 8:54 ` Laurent Vivier
1 sibling, 0 replies; 24+ messages in thread
From: Laurent Vivier @ 2019-08-21 8:54 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Kevin Wolf, Peter Maydell, qemu-block, Corey Minyard,
qemu-trivial, Stefan Weil, Michael Tokarev, Markus Armbruster,
Max Reitz, qemu-ppc, Paolo Bonzini, David Gibson
Le 19/07/2019 à 15:14, Philippe Mathieu-Daudé a écrit :
> Reported by GCC9 when building with CFLAG -Wimplicit-fallthrough=2:
>
> qobject/json-parser.c: In function ‘parse_literal’:
> qobject/json-parser.c:492:24: error: this statement may fall through [-Werror=implicit-fallthrough=]
> 492 | case JSON_INTEGER: {
> | ^
> qobject/json-parser.c:524:5: note: here
> 524 | case JSON_FLOAT:
> | ^~~~
>
> Correctly place the 'fall through' comment.
>
> Reported-by: Stefan Weil <sw@weilnetz.de>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> qobject/json-parser.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/qobject/json-parser.c b/qobject/json-parser.c
> index 7d23e12e33..d083810d37 100644
> --- a/qobject/json-parser.c
> +++ b/qobject/json-parser.c
> @@ -519,8 +519,8 @@ static QObject *parse_literal(JSONParserContext *ctxt)
> }
> assert(ret == -ERANGE);
> }
> - /* fall through to JSON_FLOAT */
> }
> + /* fall through to JSON_FLOAT */
> case JSON_FLOAT:
> /* FIXME dependent on locale; a pervasive issue in QEMU */
> /* FIXME our lexer matches RFC 8259 in forbidding Inf or NaN,
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH-for-4.1? 2/7] hw/dma/omap_dma: Move switch 'fall through' comment to correct place
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 2/7] hw/dma/omap_dma: " Philippe Mathieu-Daudé
2019-07-19 13:27 ` Peter Maydell
@ 2019-08-21 8:55 ` Laurent Vivier
1 sibling, 0 replies; 24+ messages in thread
From: Laurent Vivier @ 2019-08-21 8:55 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Kevin Wolf, Peter Maydell, qemu-block, Corey Minyard,
qemu-trivial, Stefan Weil, Michael Tokarev, Markus Armbruster,
Max Reitz, qemu-ppc, Paolo Bonzini, David Gibson
Le 19/07/2019 à 15:14, Philippe Mathieu-Daudé a écrit :
> Reported by GCC9 when building with CFLAG -Wimplicit-fallthrough=2:
>
> CC hw/dma/omap_dma.o
> hw/dma/omap_dma.c: In function ‘omap_dma_write’:
> hw/dma/omap_dma.c:1532:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
> 1532 | if (s->model <= omap_dma_3_1)
> | ^
> hw/dma/omap_dma.c:1534:5: note: here
> 1534 | case 0x400:
> | ^~~~
> cc1: all warnings being treated as errors
>
> Correctly place the 'fall through' comment.
>
> Reported-by: Stefan Weil <sw@weilnetz.de>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> hw/dma/omap_dma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/dma/omap_dma.c b/hw/dma/omap_dma.c
> index eab83c5c3a..6677237d42 100644
> --- a/hw/dma/omap_dma.c
> +++ b/hw/dma/omap_dma.c
> @@ -1531,8 +1531,8 @@ static void omap_dma_write(void *opaque, hwaddr addr,
> case 0x404 ... 0x4fe:
> if (s->model <= omap_dma_3_1)
> break;
> + /* fall through */
> case 0x400:
> - /* Fall through. */
> if (omap_dma_sys_write(s, addr, value))
> break;
> return;
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH-for-4.1? 4/7] hw/ipmi: Rewrite a fall through comment
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 4/7] hw/ipmi: " Philippe Mathieu-Daudé
2019-07-21 2:10 ` Corey Minyard
@ 2019-08-21 8:56 ` Laurent Vivier
1 sibling, 0 replies; 24+ messages in thread
From: Laurent Vivier @ 2019-08-21 8:56 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Kevin Wolf, Peter Maydell, qemu-block, Corey Minyard,
qemu-trivial, Stefan Weil, Michael Tokarev, Markus Armbruster,
Max Reitz, qemu-ppc, Paolo Bonzini, David Gibson
Le 19/07/2019 à 15:14, Philippe Mathieu-Daudé a écrit :
> GCC9 is confused by this comment when building with CFLAG
> -Wimplicit-fallthrough=2:
>
> hw/ipmi/ipmi_bmc_extern.c: In function ‘addchar’:
> hw/ipmi/ipmi_bmc_extern.c:178:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
> 178 | ch |= 0x10;
> | ~~~^~~~~~~
> hw/ipmi/ipmi_bmc_extern.c:181:5: note: here
> 181 | default:
> | ^~~~~~~
> cc1: all warnings being treated as errors
> make: *** [rules.mak:69: hw/ipmi/ipmi_bmc_extern.o] Error 1
>
> Rewrite the comment using 'fall through' which is recognized by
> GCC and static analyzers.
>
> Reported-by: Stefan Weil <sw@weilnetz.de>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> hw/ipmi/ipmi_bmc_extern.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c
> index c0a8dac346..d4cbd210c4 100644
> --- a/hw/ipmi/ipmi_bmc_extern.c
> +++ b/hw/ipmi/ipmi_bmc_extern.c
> @@ -176,8 +176,7 @@ static void addchar(IPMIBmcExtern *ibe, unsigned char ch)
> ibe->outbuf[ibe->outlen] = VM_ESCAPE_CHAR;
> ibe->outlen++;
> ch |= 0x10;
> - /* No break */
> -
> + /* fall through */
> default:
> ibe->outbuf[ibe->outlen] = ch;
> ibe->outlen++;
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH-for-4.1? 5/7] target/ppc: Rewrite a fall through comment
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 5/7] target/ppc: " Philippe Mathieu-Daudé
2019-07-19 14:20 ` David Gibson
@ 2019-08-21 8:57 ` Laurent Vivier
1 sibling, 0 replies; 24+ messages in thread
From: Laurent Vivier @ 2019-08-21 8:57 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Kevin Wolf, Peter Maydell, qemu-block, Corey Minyard,
qemu-trivial, Stefan Weil, Michael Tokarev, Markus Armbruster,
Max Reitz, qemu-ppc, Paolo Bonzini, David Gibson
Le 19/07/2019 à 15:14, Philippe Mathieu-Daudé a écrit :
> GCC9 is confused by this comment when building with CFLAG
> -Wimplicit-fallthrough=2:
>
> target/ppc/mmu_helper.c: In function ‘dump_mmu’:
> target/ppc/mmu_helper.c:1349:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
> 1349 | if (ppc64_v3_radix(env_archcpu(env))) {
> | ^
> target/ppc/mmu_helper.c:1356:5: note: here
> 1356 | default:
> | ^~~~~~~
> cc1: all warnings being treated as errors
>
> Rewrite the comment using 'fall through' which is recognized by
> GCC and static analyzers.
>
> Reported-by: Stefan Weil <sw@weilnetz.de>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> target/ppc/mmu_helper.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/target/ppc/mmu_helper.c b/target/ppc/mmu_helper.c
> index 261a8fe707..862824b073 100644
> --- a/target/ppc/mmu_helper.c
> +++ b/target/ppc/mmu_helper.c
> @@ -98,7 +98,7 @@ static int pp_check(int key, int pp, int nx)
> case 0x1:
> case 0x2:
> access |= PAGE_WRITE;
> - /* No break here */
> + /* fall through */
> case 0x3:
> access |= PAGE_READ;
> break;
> @@ -706,7 +706,7 @@ static int mmu40x_get_physical_address(CPUPPCState *env, mmu_ctx_t *ctx,
> if (pr != 0) {
> goto check_perms;
> }
> - /* No break here */
> + /* fall through */
> case 0x3:
> /* All accesses granted */
> ctx->prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
> @@ -720,7 +720,7 @@ static int mmu40x_get_physical_address(CPUPPCState *env, mmu_ctx_t *ctx,
> ret = -2;
> break;
> }
> - /* No break here */
> + /* fall through */
> case 0x1:
> check_perms:
> /* Check from TLB entry */
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH-for-4.1? 6/7] vl: Rewrite a fall through comment
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 6/7] vl: " Philippe Mathieu-Daudé
2019-07-25 0:28 ` [Qemu-devel] [Qemu-block] " John Snow
@ 2019-08-21 8:58 ` Laurent Vivier
1 sibling, 0 replies; 24+ messages in thread
From: Laurent Vivier @ 2019-08-21 8:58 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Kevin Wolf, Peter Maydell, qemu-block, Corey Minyard,
qemu-trivial, Stefan Weil, Michael Tokarev, Markus Armbruster,
Max Reitz, qemu-ppc, Paolo Bonzini, David Gibson
Le 19/07/2019 à 15:14, Philippe Mathieu-Daudé a écrit :
> GCC9 is confused by this comment when building with CFLAG
> -Wimplicit-fallthrough=2:
>
> vl.c: In function ‘qemu_ref_timedate’:
> vl.c:773:15: error: this statement may fall through [-Werror=implicit-fallthrough=]
> 773 | value -= rtc_realtime_clock_offset;
> | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> vl.c:775:5: note: here
> 775 | case QEMU_CLOCK_VIRTUAL:
> | ^~~~
> cc1: all warnings being treated as errors
>
> Rewrite the comment using 'fall through' which is recognized by
> GCC and static analyzers.
>
> Reported-by: Stefan Weil <sw@weilnetz.de>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> vl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/vl.c b/vl.c
> index a5808f9a02..f5cf71e3b4 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -771,7 +771,7 @@ static time_t qemu_ref_timedate(QEMUClockType clock)
> switch (clock) {
> case QEMU_CLOCK_REALTIME:
> value -= rtc_realtime_clock_offset;
> - /* no break */
> + /* fall through */
> case QEMU_CLOCK_VIRTUAL:
> value += rtc_ref_start_datetime;
> break;
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH-for-4.1? 7/7] spapr_events: Rewrite a fall through comment
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 7/7] spapr_events: " Philippe Mathieu-Daudé
2019-07-19 14:20 ` David Gibson
@ 2019-08-21 8:59 ` Laurent Vivier
1 sibling, 0 replies; 24+ messages in thread
From: Laurent Vivier @ 2019-08-21 8:59 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Kevin Wolf, Peter Maydell, qemu-block, Corey Minyard,
qemu-trivial, Stefan Weil, Michael Tokarev, Markus Armbruster,
Max Reitz, qemu-ppc, Paolo Bonzini, David Gibson
Le 19/07/2019 à 15:14, Philippe Mathieu-Daudé a écrit :
> GCC9 is confused by this comment when building with CFLAG
> -Wimplicit-fallthrough=2:
>
> CC ppc64-softmmu/hw/ppc/spapr_rtc.o
> hw/ppc/spapr_events.c: In function ‘rtas_event_log_to_source’:
> hw/ppc/spapr_events.c:312:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
> 312 | if (spapr_ovec_test(spapr->ov5_cas, OV5_HP_EVT)) {
> | ^
> hw/ppc/spapr_events.c:317:5: note: here
> 317 | case RTAS_LOG_TYPE_EPOW:
> | ^~~~
> cc1: all warnings being treated as errors
>
> Rewrite the comment using 'fall through' which is recognized by
> GCC and static analyzers.
>
> Reported-by: Stefan Weil <sw@weilnetz.de>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> hw/ppc/spapr_events.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/ppc/spapr_events.c b/hw/ppc/spapr_events.c
> index ae0f093f59..0a98894ad6 100644
> --- a/hw/ppc/spapr_events.c
> +++ b/hw/ppc/spapr_events.c
> @@ -313,7 +313,7 @@ rtas_event_log_to_source(SpaprMachineState *spapr, int log_type)
> g_assert(source->enabled);
> break;
> }
> - /* fall back to epow for legacy hotplug interrupt source */
> + /* fall through back to epow for legacy hotplug interrupt source */
> case RTAS_LOG_TYPE_EPOW:
> source = spapr_event_sources_get_source(spapr->event_sources,
> EVENT_CLASS_EPOW);
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2019-08-21 9:14 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-19 13:14 [Qemu-devel] [PATCH-for-4.1? 0/7] Trivial switch 'fall through' comment fixes for GCC9 Philippe Mathieu-Daudé
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 1/7] json: Move switch 'fall through' comment to correct place Philippe Mathieu-Daudé
2019-07-19 15:31 ` Eric Blake
2019-08-21 8:54 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 2/7] hw/dma/omap_dma: " Philippe Mathieu-Daudé
2019-07-19 13:27 ` Peter Maydell
2019-08-21 8:55 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1 3/7] hw/block/pflash_cfi02: Rewrite a fall through comment Philippe Mathieu-Daudé
2019-07-19 13:27 ` Peter Maydell
2019-07-22 11:43 ` Philippe Mathieu-Daudé
2019-07-25 0:27 ` [Qemu-devel] [Qemu-block] " John Snow
2019-07-25 10:59 ` Philippe Mathieu-Daudé
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 4/7] hw/ipmi: " Philippe Mathieu-Daudé
2019-07-21 2:10 ` Corey Minyard
2019-08-21 8:56 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 5/7] target/ppc: " Philippe Mathieu-Daudé
2019-07-19 14:20 ` David Gibson
2019-08-21 8:57 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 6/7] vl: " Philippe Mathieu-Daudé
2019-07-25 0:28 ` [Qemu-devel] [Qemu-block] " John Snow
2019-08-21 8:58 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
2019-07-19 13:14 ` [Qemu-devel] [PATCH-for-4.1? 7/7] spapr_events: " Philippe Mathieu-Daudé
2019-07-19 14:20 ` David Gibson
2019-08-21 8:59 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.