linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PM / hibernate: Mark expected switch fall-through
@ 2018-08-05  2:12 Gustavo A. R. Silva
  2018-08-05  9:34 ` Pavel Machek
  2018-08-12 11:20 ` Rafael J. Wysocki
  0 siblings, 2 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-05  2:12 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Pavel Machek
  Cc: linux-pm, linux-kernel, Gustavo A. R. Silva

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();
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] PM / hibernate: Mark expected switch fall-through
  2018-08-05  2:12 [PATCH] PM / hibernate: Mark expected switch fall-through Gustavo A. R. Silva
@ 2018-08-05  9:34 ` Pavel Machek
  2018-08-12 11:20 ` Rafael J. Wysocki
  1 sibling, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2018-08-05  9:34 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Rafael J. Wysocki, Len Brown, linux-pm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 481 bytes --]

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>

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] PM / hibernate: Mark expected switch fall-through
  2018-08-05  2:12 [PATCH] PM / hibernate: Mark expected switch fall-through Gustavo A. R. Silva
  2018-08-05  9:34 ` Pavel Machek
@ 2018-08-12 11:20 ` Rafael J. Wysocki
  1 sibling, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2018-08-12 11:20 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: Len Brown, Pavel Machek, linux-pm, linux-kernel

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!


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-12 11:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-05  2:12 [PATCH] PM / hibernate: Mark expected switch fall-through Gustavo A. R. Silva
2018-08-05  9:34 ` Pavel Machek
2018-08-12 11:20 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).