All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] x86/io_delay: break instead of fallthrough in switch statement
@ 2019-05-21  7:22 Masahiro Yamada
  2019-05-21  7:22 ` [PATCH 2/2] x86/io_delay: define IO_DELAY macros in C instead of Kconfig Masahiro Yamada
  2019-05-24  8:04 ` [tip:x86/cleanups] x86/io_delay: Break instead of fallthrough in switch statement tip-bot for Masahiro Yamada
  0 siblings, 2 replies; 4+ messages in thread
From: Masahiro Yamada @ 2019-05-21  7:22 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, Borislav Petkov, Peter Zijlstra,
	x86
  Cc: H . Peter Anvin, Masahiro Yamada, linux-kernel

The current code is fine since 'case CONFIG_IO_DELAY_TYPE_NONE'
does nothing, but scripts/checkpatch.pl complains about this:

  warning: Possible switch case/default not preceded by break or fallthrough comment

I like break statement better than a fallthrough comment here.
It avoids the warning and clarify the code.

No behavior change is intended.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 arch/x86/kernel/io_delay.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/io_delay.c b/arch/x86/kernel/io_delay.c
index 805b7a341aca..3dc874d5d43b 100644
--- a/arch/x86/kernel/io_delay.c
+++ b/arch/x86/kernel/io_delay.c
@@ -39,6 +39,7 @@ void native_io_delay(void)
 		 * are shorter until calibrated):
 		 */
 		udelay(2);
+		break;
 	case CONFIG_IO_DELAY_TYPE_NONE:
 		break;
 	}
-- 
2.17.1


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

end of thread, other threads:[~2019-05-24  8:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-21  7:22 [PATCH 1/2] x86/io_delay: break instead of fallthrough in switch statement Masahiro Yamada
2019-05-21  7:22 ` [PATCH 2/2] x86/io_delay: define IO_DELAY macros in C instead of Kconfig Masahiro Yamada
2019-05-24  8:04   ` [tip:x86/cleanups] x86/io_delay: Define " tip-bot for Masahiro Yamada
2019-05-24  8:04 ` [tip:x86/cleanups] x86/io_delay: Break instead of fallthrough in switch statement tip-bot for Masahiro Yamada

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.