From: Zhang Qilong <zhangqilong3@huawei.com> To: <gregkh@linuxfoundation.org>, <shawnguo@kernel.org>, <s.hauer@pengutronix.de> Cc: <kernel@pengutronix.de>, <festevam@gmail.com>, <linux-imx@nxp.com>, <linux-serial@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org> Subject: [PATCH -next] tty: serial: imx: remove unnecessary breaks Date: Mon, 26 Oct 2020 20:51:42 +0800 [thread overview] Message-ID: <20201026125142.21105-1-zhangqilong3@huawei.com> (raw) The 'break' is not possoble to be reached because of previous 'return', discard it. Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> --- drivers/tty/serial/imx.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 1731d9728865..09703079db7b 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -320,7 +320,6 @@ static u32 imx_uart_readl(struct imx_port *sport, u32 offset) switch (offset) { case UCR1: return sport->ucr1; - break; case UCR2: /* * UCR2_SRST is the only bit in the cached registers that might @@ -331,16 +330,12 @@ static u32 imx_uart_readl(struct imx_port *sport, u32 offset) if (!(sport->ucr2 & UCR2_SRST)) sport->ucr2 = readl(sport->port.membase + offset); return sport->ucr2; - break; case UCR3: return sport->ucr3; - break; case UCR4: return sport->ucr4; - break; case UFCR: return sport->ufcr; - break; default: return readl(sport->port.membase + offset); } -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: Zhang Qilong <zhangqilong3@huawei.com> To: <gregkh@linuxfoundation.org>, <shawnguo@kernel.org>, <s.hauer@pengutronix.de> Cc: linux-arm-kernel@lists.infradead.org, festevam@gmail.com, linux-imx@nxp.com, kernel@pengutronix.de, linux-serial@vger.kernel.org Subject: [PATCH -next] tty: serial: imx: remove unnecessary breaks Date: Mon, 26 Oct 2020 20:51:42 +0800 [thread overview] Message-ID: <20201026125142.21105-1-zhangqilong3@huawei.com> (raw) The 'break' is not possoble to be reached because of previous 'return', discard it. Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> --- drivers/tty/serial/imx.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 1731d9728865..09703079db7b 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -320,7 +320,6 @@ static u32 imx_uart_readl(struct imx_port *sport, u32 offset) switch (offset) { case UCR1: return sport->ucr1; - break; case UCR2: /* * UCR2_SRST is the only bit in the cached registers that might @@ -331,16 +330,12 @@ static u32 imx_uart_readl(struct imx_port *sport, u32 offset) if (!(sport->ucr2 & UCR2_SRST)) sport->ucr2 = readl(sport->port.membase + offset); return sport->ucr2; - break; case UCR3: return sport->ucr3; - break; case UCR4: return sport->ucr4; - break; case UFCR: return sport->ufcr; - break; default: return readl(sport->port.membase + offset); } -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2020-10-26 12:41 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-26 12:51 Zhang Qilong [this message] 2020-10-26 12:51 ` [PATCH -next] tty: serial: imx: remove unnecessary breaks Zhang Qilong 2020-10-26 16:34 ` Uwe Kleine-König 2020-10-26 16:34 ` Uwe Kleine-König 2020-10-27 8:54 ` 答复: " zhangqilong 2020-10-27 8:54 ` zhangqilong
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201026125142.21105-1-zhangqilong3@huawei.com \ --to=zhangqilong3@huawei.com \ --cc=festevam@gmail.com \ --cc=gregkh@linuxfoundation.org \ --cc=kernel@pengutronix.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-imx@nxp.com \ --cc=linux-serial@vger.kernel.org \ --cc=s.hauer@pengutronix.de \ --cc=shawnguo@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.