Re: [PATCH v3 2/9] hw/{arm,ppc}: Resolve unreachable code

2022-10-18 Thread Peter Maydell
On Mon, 17 Oct 2022 at 21:57, Philippe Mathieu-Daudé wrote: > > On 16/10/22 14:27, Bernhard Beschow wrote: > > pflash_cfi01_register() always returns with a non-NULL pointer (otherwise > > it would crash internally). Therefore, the bodies of the if-statements > > are unreachable. > > This is

Re: [PATCH v3 2/9] hw/{arm,ppc}: Resolve unreachable code

2022-10-17 Thread Bernhard Beschow
Am 17. Oktober 2022 20:57:06 UTC schrieb "Philippe Mathieu-Daudé" : >On 16/10/22 14:27, Bernhard Beschow wrote: >> pflash_cfi01_register() always returns with a non-NULL pointer (otherwise >> it would crash internally). Therefore, the bodies of the if-statements >> are unreachable. > >This is

Re: [PATCH v3 2/9] hw/{arm,ppc}: Resolve unreachable code

2022-10-17 Thread Philippe Mathieu-Daudé
On 16/10/22 14:27, Bernhard Beschow wrote: pflash_cfi01_register() always returns with a non-NULL pointer (otherwise it would crash internally). Therefore, the bodies of the if-statements are unreachable. This is true, pflash_cfi0X_register() use an hardcoded _fatal. Shouldn't it be better to

[PATCH v3 2/9] hw/{arm,ppc}: Resolve unreachable code

2022-10-16 Thread Bernhard Beschow
pflash_cfi01_register() always returns with a non-NULL pointer (otherwise it would crash internally). Therefore, the bodies of the if-statements are unreachable. Signed-off-by: Bernhard Beschow --- hw/arm/gumstix.c | 18 ++ hw/arm/mainstone.c | 13 +