From patchwork Wed Nov 4 06:33:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernard Zhao X-Patchwork-Id: 11879685 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EEC0C4741F for ; Wed, 4 Nov 2020 06:34:48 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B828F223BD for ; Wed, 4 Nov 2020 06:34:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QYH6NZkv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B828F223BD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=vivo.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=EbaTRIQ3rozvi/CZ0BFvk3+CmyqS5NdFttI6KILGxfk=; b=QYH6NZkvO2xEF+XwKu2hF5mQ9 7OhrBU6wHlefI5j4qekRZhh3wOs0DSwll/qc31xP4jKCqSe83+vecZquc3zoCouXQHjbRF/ycvmdu Nek1Sb8PvyhyOssQPjQZjsn14Pwd2gtCZj8A7zBLqkK05Ed3Yks4UBgVI6Amq8k5AyChZl6xweax2 JmJ61hD4ahH/csfwgHRkSp1ipow3Ar6Dxq2oyjrlBwwamGzGrTyuY0OXqBMdDfcEO8WZE+oVjmEtl VdyeN6yqaEkp8w0e5zQ1Lz9hk/d6UPSYidUA0L05bHqY1L9D9q7jPgHeLSb2n6gjEGrzMeMTAOIh5 J78C5NBJw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaCMz-0002vk-Cv; Wed, 04 Nov 2020 06:34:09 +0000 Received: from mail-m17613.qiye.163.com ([59.111.176.13]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaCMe-0002sF-3h for linux-arm-kernel@lists.infradead.org; Wed, 04 Nov 2020 06:33:49 +0000 Received: from ubuntu.localdomain (unknown [58.213.83.157]) by mail-m17613.qiye.163.com (Hmail) with ESMTPA id 67222482C58; Wed, 4 Nov 2020 14:33:45 +0800 (CST) From: Bernard Zhao To: Greg Kroah-Hartman , Jiri Slaby , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] drivers/tty: delete break after return Date: Tue, 3 Nov 2020 22:33:26 -0800 Message-Id: <20201104063327.15572-5-bernard@vivo.com> X-Mailer: git-send-email 2.29.0 In-Reply-To: <20201104063327.15572-1-bernard@vivo.com> References: <20201104063327.15572-1-bernard@vivo.com> MIME-Version: 1.0 X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZS1VLWVdZKFlBSE83V1ktWUFJV1kPCR oVCBIfWUFZHh8ZSklMHU8dS0NNVkpNS09PTEpNSU5MSkJVEwETFhoSFyQUDg9ZV1kWGg8SFR0UWU FZT0tIVUpKS09ISFVLWQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6OTY6CCo*Gj8fGRhIGT1NHRkR HwkwCVZVSlVKTUtPT0xKTUlNSkpCVTMWGhIXVRkeCRUaCR87DRINFFUYFBZFWVdZEgtZQVlOQ1VJ SkhVQ0hVSk5MWVdZCAFZQUlNTkI3Bg++ X-HM-Tid: 0a7591f617b993bakuws67222482c58 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201104_013348_435548_F2B9CA8C X-CRM114-Status: UNSURE ( 9.04 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: opensource.kernel@vivo.com, bernard@vivo.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Delete break after return, which will never run. Signed-off-by: Bernard Zhao --- drivers/tty/nozomi.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c index d42b854cb7df..946cc16827aa 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,7 +458,6 @@ 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.. @@ -468,7 +465,6 @@ static u32 write_mem32(void __iomem *mem_addr_start, const u32 *buf, case 4: /* 4 bytes */ writel(__cpu_to_le32(*buf), ptr); return 4; - break; } while (i < size_bytes) { From patchwork Wed Nov 4 06:33:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernard Zhao X-Patchwork-Id: 11879687 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED921C388F9 for ; Wed, 4 Nov 2020 06:34:50 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7AD8222384 for ; Wed, 4 Nov 2020 06:34:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="q3x+SgeT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7AD8222384 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=vivo.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=WQgQyYYA/Dq/Oik/gNDRPCC6BngekDKVoK3mhwUI4AY=; b=q3x+SgeTwlQGI/8vQSLBKNVYa ofM2hDs2HVcrAeaZHNi+I31EO1WAnFNi709HdNIScX6qpBeyk6wJ2sRN0oOZTtCx3FynR21ifzQvX WkHgP6f5538IUs4amxs+R2C7E57s9GOTzI3gDiJijog3QZp5ZaEGJ77DdrDU9gOt0jYaHzroobKcs ozurbgED+D8YJfgC2vV/SKdMxzvlUH4eba7FD5FrSE+rSFffXXpqGdSYU5sDZPQqsWdNeTnykE6Rg WVp49ScF6mT6YLTfBT0hD1hZ6feHB8rubvV+4FETDaapu20e8yPrFVRR3LhjAbl/QwbMfpXU4XXs7 dyhHGcUjg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaCN3-0002wK-Gg; Wed, 04 Nov 2020 06:34:13 +0000 Received: from mail-m17613.qiye.163.com ([59.111.176.13]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaCMg-0002t2-8N for linux-arm-kernel@lists.infradead.org; Wed, 04 Nov 2020 06:33:51 +0000 Received: from ubuntu.localdomain (unknown [58.213.83.157]) by mail-m17613.qiye.163.com (Hmail) with ESMTPA id 7839F482A2D; Wed, 4 Nov 2020 14:33:47 +0800 (CST) From: Bernard Zhao To: Greg Kroah-Hartman , Jiri Slaby , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] drivers/tty: delete break after return Date: Tue, 3 Nov 2020 22:33:27 -0800 Message-Id: <20201104063327.15572-6-bernard@vivo.com> X-Mailer: git-send-email 2.29.0 In-Reply-To: <20201104063327.15572-1-bernard@vivo.com> References: <20201104063327.15572-1-bernard@vivo.com> MIME-Version: 1.0 X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZS1VLWVdZKFlBSE83V1ktWUFJV1kPCR oVCBIfWUFZHhlPGUNIGU5LTUIYVkpNS09PTEpNSUxDTUpVEwETFhoSFyQUDg9ZV1kWGg8SFR0UWU FZT0tIVUpKS09ISFVLWQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6Nww6Iyo5Iz8vNxgzGT45HQhM PE8KCRBVSlVKTUtPT0xKTUlDSU5KVTMWGhIXVRkeCRUaCR87DRINFFUYFBZFWVdZEgtZQVlOQ1VJ SkhVQ0hVSk5MWVdZCAFZQUlOTks3Bg++ X-HM-Tid: 0a7591f6202693bakuws7839f482a2d X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201104_013350_630916_F1E8CE83 X-CRM114-Status: UNSURE ( 8.70 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: opensource.kernel@vivo.com, bernard@vivo.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Delete break after return, which will never run. Signed-off-by: Bernard Zhao --- 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); }