diff mbox series

PM / hibernate: Mark expected switch fall-through

Message ID 20180805021200.GA10911@embeddedor.com (mailing list archive)
State Mainlined
Delegated to: Rafael Wysocki
Headers show
Series PM / hibernate: Mark expected switch fall-through | expand

Commit Message

Gustavo A. R. Silva Aug. 5, 2018, 2:12 a.m. UTC
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 114713 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 kernel/power/hibernate.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Pavel Machek Aug. 5, 2018, 9:34 a.m. UTC | #1
On Sat 2018-08-04 21:12:00, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Addresses-Coverity-ID: 114713 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Acked-by: Pavel Machek <pavel@ucw.cz>
Rafael J. Wysocki Aug. 12, 2018, 11:20 a.m. UTC | #2
On Sunday, August 5, 2018 4:12:00 AM CEST Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Addresses-Coverity-ID: 114713 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
>  kernel/power/hibernate.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
> index 9c85c78..38f3f96 100644
> --- a/kernel/power/hibernate.c
> +++ b/kernel/power/hibernate.c
> @@ -638,6 +638,7 @@ static void power_down(void)
>  		break;
>  	case HIBERNATION_PLATFORM:
>  		hibernation_platform_enter();
> +		/* Fall through */
>  	case HIBERNATION_SHUTDOWN:
>  		if (pm_power_off)
>  			kernel_power_off();
> 

Applied, thanks!
diff mbox series

Patch

diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index 9c85c78..38f3f96 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -638,6 +638,7 @@  static void power_down(void)
 		break;
 	case HIBERNATION_PLATFORM:
 		hibernation_platform_enter();
+		/* Fall through */
 	case HIBERNATION_SHUTDOWN:
 		if (pm_power_off)
 			kernel_power_off();