From patchwork Thu Oct 8 05:34:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 7349071 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 453B2BEEA4 for ; Thu, 8 Oct 2015 05:39:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 62FD9207B0 for ; Thu, 8 Oct 2015 05:39:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 84781207AF for ; Thu, 8 Oct 2015 05:38:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zk3rp-0006Bj-ON; Thu, 08 Oct 2015 05:35:49 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zk3rY-000637-Kh for linux-arm-kernel@lists.infradead.org; Thu, 08 Oct 2015 05:35:33 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NVV00JVDZISR010@mailout2.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 08 Oct 2015 06:35:16 +0100 (BST) X-AuditID: cbfec7f5-f794b6d000001495-25-56160094450a Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id FB.AD.05269.49006165; Thu, 8 Oct 2015 06:35:16 +0100 (BST) Received: from localhost.localdomain ([10.252.80.64]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NVV001ENZIA2J60@eusync4.samsung.com>; Thu, 08 Oct 2015 06:35:16 +0100 (BST) From: Krzysztof Kozlowski To: Lukasz Majewski , Zhang Rui , Eduardo Valentin , Kukjin Kim , Krzysztof Kozlowski , linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] thermal: exynos: Directly return 0 instead of using local ret variable Date: Thu, 08 Oct 2015 14:34:06 +0900 Message-id: <1444282446-6419-5-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1444282446-6419-1-git-send-email-k.kozlowski@samsung.com> References: <1444282446-6419-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprKLMWRmVeSWpSXmKPExsVy+t/xa7pTGMTCDI6vZbeYf+Uaq8XrF4YW /Y9fM1u8ebiZ0WLTY6DQ5V1z2Cw+9x5htJhxfh+TxZOHfWwOnB47Z91l91i85yWTx6ZVnWwe m5fUe/RtWcXo8XmTXABbFJdNSmpOZllqkb5dAlfG4abbjAUNXBWvZjUzNzDu4Ohi5OCQEDCR ePHCuYuRE8gUk7hwbz1bFyMXh5DAUkaJhYc7oJz/jBIbv79mB6liEzCW2Lx8CVhCROAMk8TJ jq2MIAlhgViJvj+H2EBsFgFViRu9m1lAbF4BN4mf/bfZIVbISZw8NpkVxOYUcJd4d+MwWK8Q UM3aBfNYJzDyLGBkWMUomlqaXFCclJ5rpFecmFtcmpeul5yfu4kRElhfdzAuPWZ1iFGAg1GJ h/eHsUiYEGtiWXFl7iFGCQ5mJRHenfNFw4R4UxIrq1KL8uOLSnNSiw8xSnOwKInzztz1PkRI ID2xJDU7NbUgtQgmy8TBKdXAuEn5DMcBK87w6V635Kb+W7GTKUpt8lIWfatf364/4dqb6vGR 6Sen0avshUdNUu3rNspK5dlKXbqYfETvT/vfTfv3vghtl1/6IMG+o+hL0y+h9O6A3S8qJ6Qu EOfz6fTSSv3uKqHINCv3mKy71sob1Q8W3H6wtUxllZzhiz8Ra/xPvkuYK/jpvxJLcUaioRZz UXEiABCYhc4oAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151007_223533_040713_7758FC18 X-CRM114-Status: GOOD ( 19.17 ) X-Spam-Score: -6.9 (------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The 'ret' variable in exynos5440_tmu_initialize() is initialized to 0 and returned as is. Replace it with direct return statement. This also fixes coccinelle warning: drivers/thermal/samsung/exynos_tmu.c:611:5-8: Unneeded variable: "ret". Return "0" on line 654 Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Acked-by: Lukasz Majewski Tested-by: Lukasz Majewski --- drivers/thermal/samsung/exynos_tmu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 1af7ea8dda71..f340e6edcb49 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -608,7 +608,7 @@ static int exynos5440_tmu_initialize(struct platform_device *pdev) { struct exynos_tmu_data *data = platform_get_drvdata(pdev); unsigned int trim_info = 0, con, rising_threshold; - int ret = 0, threshold_code; + int threshold_code; int crit_temp = 0; /* @@ -651,7 +651,8 @@ static int exynos5440_tmu_initialize(struct platform_device *pdev) /* Clear the PMIN in the common TMU register */ if (!data->id) writel(0, data->base_second + EXYNOS5440_TMU_PMIN); - return ret; + + return 0; } static int exynos7_tmu_initialize(struct platform_device *pdev)