* [PATCH] tty: nozomi: remove unneeded break
@ 2020-10-19 17:57 trix
0 siblings, 0 replies; only message in thread
From: trix @ 2020-10-19 17:57 UTC (permalink / raw)
To: gregkh, jirislaby; +Cc: linux-kernel, Tom Rix
From: Tom Rix <trix@redhat.com>
A break is not needed if it is preceded by a return
Add explicit fallthrough
Signed-off-by: Tom Rix <trix@redhat.com>
---
drivers/tty/nozomi.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c
index d42b854cb7df..861e95043191 100644
--- a/drivers/tty/nozomi.c
+++ b/drivers/tty/nozomi.c
@@ -414,11 +414,9 @@ static void read_mem32(u32 *buf, const void __iomem *mem_addr_start,
buf16 = (u16 *) buf;
*buf16 = __le16_to_cpu(readw(ptr));
goto out;
- break;
case 4: /* 4 bytes */
*(buf) = __le32_to_cpu(readl(ptr));
goto out;
- break;
}
while (i < size_bytes) {
@@ -460,15 +458,14 @@ static u32 write_mem32(void __iomem *mem_addr_start, const u32 *buf,
buf16 = (const u16 *)buf;
writew(__cpu_to_le16(*buf16), ptr);
return 2;
- break;
case 1: /*
* also needs to write 4 bytes in this case
* so falling through..
*/
+ fallthrough;
case 4: /* 4 bytes */
writel(__cpu_to_le32(*buf), ptr);
return 4;
- break;
}
while (i < size_bytes) {
--
2.18.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-19 17:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-19 17:57 [PATCH] tty: nozomi: remove unneeded break trix
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome