From patchwork Sat Dec 30 01:12:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 10137557 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3ECD66037D for ; Sat, 30 Dec 2017 01:18:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 316E72B55D for ; Sat, 30 Dec 2017 01:18:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 23B762B551; Sat, 30 Dec 2017 01:18:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B27382B551 for ; Sat, 30 Dec 2017 01:18:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751145AbdL3BNb (ORCPT ); Fri, 29 Dec 2017 20:13:31 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34977 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751055AbdL3BNZ (ORCPT ); Fri, 29 Dec 2017 20:13:25 -0500 Received: by mail-wm0-f66.google.com with SMTP id a79so11266444wma.0 for ; Fri, 29 Dec 2017 17:13:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nexus-software-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=H1EDBdcVyVuFF18a5wCD8eQd835P1EnzAJnkNL5hjr8=; b=lnLxtrQ9bh3DWs0ZW15zGjU0tey44uSL2UiOGCdSIm507zMUOvc/gfwyyTIHJv+Bph BhIDbS7dM8AlyJIkW2LHF8OvRb1/thZNt5sZU5Q1wuZzeesRQcxn5Ppkvh2VTxhakoMM khjV08iKwAy0mBtNvMhEVekyR9y94nNkA4GNHmHEWRA4nRMs8fF8r676BJR2VhDqMi6J AMbtw7TeQXhtYQn4BnZjsj/H/WwU5IOLVXezOd0PSmJ8NnzJ38e+Eg2pljjT3KhUQs0W mJLWqA9j0Cx+Xg6AwtmtT5tnNLXz6CBtyKnfV6WG+UAtLdjPCXlp+HNlDszM5EynHHut 2NKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=H1EDBdcVyVuFF18a5wCD8eQd835P1EnzAJnkNL5hjr8=; b=qFpLqzGij0ruYTy/plFqWanj8ldMxj4beHYFq+93s05vS2Crieo7EedWjs6vZNAS5F TtsR9k0YxqK4pvMlcgVwTEO3suSOXQb2K0fWxb3OXq9RugWvHDO8hxeGX5U5xyBVqhvO qduyHYYVvAP9zpQiNUpqvdkWjs20NMoIIzhPMIHgsUIszBXsvF1Z9nwKEwEwtbUYUJoL jGO80bwN8ehJa5XaSwJCG/dYjbF52Xo/IEHZVdPxs2h5vONsWkLdTFg5CJ8RbMIebTjJ wsgdWzJUgB75ZSy2yHE+M0xHnDJeLEPSPSLgkzkt5pw5gW9uYzlMlR1ZCiyppUILuClR XZig== X-Gm-Message-State: AKGB3mKaucedZXbhw3GJvjtJ3eckQDAgSKdMyuzDm/6BSbLpX8wk6Jws L9xqoD/QgY4qCxpBnwAxaYGFQg== X-Google-Smtp-Source: ACJfBos7KK9FIbWchuWaD+9okxZ0moKggBnxMaXFklod+42+j2aNXfZQ24AhDy0h6mH0F6vOVwiUEA== X-Received: by 10.80.183.148 with SMTP id h20mr45845147ede.53.1514596404707; Fri, 29 Dec 2017 17:13:24 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id h4sm29818268edb.16.2017.12.29.17.13.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Dec 2017 17:13:24 -0800 (PST) From: Bryan O'Donoghue To: mturquette@baylibre.com, sboyd@codeaurora.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Cc: pure.logic@nexus-software.ie, Akinobu Mita Subject: [PATCH 12/33] clk: cdce925: remove unnecessary long casts on return Date: Sat, 30 Dec 2017 01:12:51 +0000 Message-Id: <1514596392-22270-13-git-send-email-pure.logic@nexus-software.ie> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514596392-22270-1-git-send-email-pure.logic@nexus-software.ie> References: <1514596392-22270-1-git-send-email-pure.logic@nexus-software.ie> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Due to the old function signature of clk_ops->round_rate the cdce925 round_rate functions end up doing a cast of an internal unsigned long to a long. After updating clk_ops->round_rate() to be an unsigned long though the cast isn't necessary. Remove the extraneous cast from: - cdce925_pll_round_rate - cdce925_clk_round_rate - cdce925_clk_y1_round_rate Signed-off-by: Bryan O'Donoghue Cc: Michael Turquette Cc: Stephen Boyd Cc: Akinobu Mita Cc: linux-clk@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- drivers/clk/clk-cdce925.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/clk-cdce925.c b/drivers/clk/clk-cdce925.c index 341e744..eecc262 100644 --- a/drivers/clk/clk-cdce925.c +++ b/drivers/clk/clk-cdce925.c @@ -149,7 +149,7 @@ static unsigned long cdce925_pll_round_rate(struct clk_hw *hw, u16 n, m; cdce925_pll_find_rate(rate, *parent_rate, &n, &m); - return (long)cdce925_pll_calculate_rate(*parent_rate, n, m); + return cdce925_pll_calculate_rate(*parent_rate, n, m); } static int cdce925_pll_set_rate(struct clk_hw *hw, unsigned long rate, @@ -449,7 +449,7 @@ static unsigned long cdce925_clk_round_rate(struct clk_hw *hw, } if (divider) - return (long)(l_parent_rate / divider); + return l_parent_rate / divider; return 0; } @@ -497,7 +497,7 @@ static unsigned long cdce925_clk_y1_round_rate(struct clk_hw *hw, u16 divider = cdce925_y1_calc_divider(rate, l_parent_rate); if (divider) - return (long)(l_parent_rate / divider); + return l_parent_rate / divider; return 0; }