From patchwork Mon Jan 1 19:42:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 10139525 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 986EE601A1 for ; Mon, 1 Jan 2018 19:50:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 893FB28617 for ; Mon, 1 Jan 2018 19:50:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7E287286C0; Mon, 1 Jan 2018 19:50:38 +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 2810828617 for ; Mon, 1 Jan 2018 19:50:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753849AbeAATtw (ORCPT ); Mon, 1 Jan 2018 14:49:52 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:41567 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753804AbeAATna (ORCPT ); Mon, 1 Jan 2018 14:43:30 -0500 Received: by mail-wm0-f66.google.com with SMTP id g75so58610362wme.0 for ; Mon, 01 Jan 2018 11:43:29 -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=P43nfL0FxRBM5zeOGIGAMCYYsD9t1v5mtMVV3eobRJT4vx8QR5CxvuS3jsfRHQaMWp kSPY28hbzETq9wYcf3Dj67P7mjfUr2Gz4KlIrRXX+dBjYj84KsAaXXPoAEaTQf3rvE7B foqeg35dwUme4F67Z0z+wkz5Xxh8GmAPwwnkcgCZuMu5jB1m4SSosgOxxZ2EF1ojfoel BYnzwj5zY/s2R+b/jGIElg5mWBZBnwmgcSh6mpbuceU94embwcGZvmJPKk+4ebBQPPQq plM2l8whBJUypilB/UQYZFmXMRbjkqmF7ZGMnH15YIRG62rEzLrV++ht5E2lvWtgyili 3TXg== 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=Bsh2jcDhGMQ8fWJ2xEejLImHsu7QyUo6oHENIRZXNrWGbGxny9umLSF+y9u2J+hfGW zmfHzVKVJW/VD5gVj3N7AboOOBgEABmIv4+uHXgS2/U1NYfns1lfxBdLCDxuDhFtZvxa lkbaamUW15Fdxd3k4oYLxM2ZI+CzpBfjkwc9n4knFSZxVGt619CZeIOJ8wPC3Ij/BdNw ga5dG8XLvbmSExx56cF4FkWbF9tzfzC6iSR1VEarJF9lZb6HMAapKYXpm4ls5mvl+Hbo clt1HaDmdZLSlq/fHeNAnVvUheuQ75d4CMtBNmm0tj0ukPjz03Q+Wlnd/zFcn3PY4tBb sPEA== X-Gm-Message-State: AKGB3mIJEHVkw+z5s8LWFglKJv0aRTd0yRhRKujX3lgSbb1yhtZOLrPN m1tKQm8AVi6WKgJEUiGYHAQ7fttH X-Google-Smtp-Source: ACJfBovsW+X0rxzgyycygeti4NleJnGvkTQ6VCEV1oA6yYWuK0Ijffc0kq4WXRMtyb3KylK+WBQcaw== X-Received: by 10.80.187.99 with SMTP id y90mr58210101ede.154.1514835808884; Mon, 01 Jan 2018 11:43:28 -0800 (PST) Received: from localhost.localdomain (D4CCACC7.cm-2.dynamic.ziggo.nl. [212.204.172.199]) by smtp.gmail.com with ESMTPSA id w2sm39361075edb.4.2018.01.01.11.43.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Jan 2018 11:43:28 -0800 (PST) From: Bryan O'Donoghue To: mturquette@baylibre.com, sboyd@codeaurora.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Cc: Bryan O'Donoghue , Akinobu Mita Subject: [PATCH v3 12/34] clk: cdce925: remove unnecessary long casts on return Date: Mon, 1 Jan 2018 19:42:51 +0000 Message-Id: <1514835793-1104-13-git-send-email-pure.logic@nexus-software.ie> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514835793-1104-1-git-send-email-pure.logic@nexus-software.ie> References: <1514835793-1104-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; }