From patchwork Fri Jul 7 20:06:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 117277 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp3514479vqx; Fri, 7 Jul 2023 13:12:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlHx+ue5Y+brbjTQg66V6fxTSxwSO5mTZgfU//ww8D4G5Ug/IFeMQ/BMzvp5UWLONfo+eQKP X-Received: by 2002:a17:90a:7e8e:b0:264:a14:ce19 with SMTP id j14-20020a17090a7e8e00b002640a14ce19mr4680769pjl.20.1688760760827; Fri, 07 Jul 2023 13:12:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688760760; cv=none; d=google.com; s=arc-20160816; b=NzvFFtNuYTOVG9t+/pLEEJSw/VJRZNjE3SLetHHoz9IXaA+f7mnKGWXxhe0WbbveRr EOwpbA7pPnwGA/dNN6vXKOXFOlkzqcnA3kXInXSZwnKAZokJ9uJRWtD8Q5wciSK4Qnb0 lxk5S4IucwRe2qwZsW9UuDT2FQ8IYFtA4ZZrJBVv7uinrfiaUiBYh6cH9rN1zIojamvt bz59y6OliqGf1m3AYXu7X0bkhTJ9a7wMx5BQW4yKGFGiYmIonlGUP0/TEqXYr7WU2k0G n5qsQbgbYUrpG1VkSY3iSg9d9ARfpgbi0b4DmP+4nanLb0fNnSmJ3pfFPDmSAcP1AyGu 1Jkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=NNP4iq0IL2DpVEo7mW+DHCzkYdUL71H8TAMN9x7jU5Y=; fh=mr2uMPGNota9Qt/BzIAeY/cQ2a8M0y5RYkShHDxH9KI=; b=D4PxuaQL6lwfrvFuNNZsL2V9yZ3gL/Czbpyg6Os/5O9wQg+Bpg6b0cSZ8+gsw5L4jz nvNEIXhyUsvyzn9ECuX/tF17k8Ocr9L/IIi7OpSaKuOsq7tZT2lRqJnriqsKft9p8xUu 9QJQ6KRwxJRAd6lWfIhL6jJ0aSSvXB/ykj8O8B/3Ytq0fchvkLTq/k2dc+PmY7pmCYE5 HVbhCgHvFtIkTSwkIPg/bg+IHpgYYl1m7Am2ZCZaP9SFj9uwMd4sUikOeGtVCOVl3iGO Mzqsj6ocf+eBO1+j3hZaVXvVskauD51+5UsqKbRdHh7TKNxnj3Hxk9FFSMjz3KqHnhgq 96gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=qxKDn1rd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m14-20020a170902db0e00b001b88e609e56si4531665plx.488.2023.07.07.13.12.27; Fri, 07 Jul 2023 13:12:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=qxKDn1rd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232533AbjGGUGh (ORCPT + 99 others); Fri, 7 Jul 2023 16:06:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232454AbjGGUGg (ORCPT ); Fri, 7 Jul 2023 16:06:36 -0400 Received: from smtp.smtpout.orange.fr (smtp-26.smtpout.orange.fr [80.12.242.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F4411FE0 for ; Fri, 7 Jul 2023 13:06:33 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id HrioqFRE4feeSHrioqfk6G; Fri, 07 Jul 2023 22:06:31 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1688760391; bh=NNP4iq0IL2DpVEo7mW+DHCzkYdUL71H8TAMN9x7jU5Y=; h=From:To:Cc:Subject:Date; b=qxKDn1rd6aRJntv6HEybP95UQQBUkoBRs3iYH63Tb/bqRsbmkhMY3DuIs7ihp/fYV LReyOPV1nl4Fos2uTIwXc6P9DwQ+mFRa9IsfNGY+kY3Cbitk+1LSNZZxph7mP6VKkG 0Yt1IxbEPqIJZ76+naNI55mNwrGeJl25YfnKnoRf0JUQ03dER75D/FX2SMwmBUGwth WKcEKGP13mHGDmgU/u5b/VZwxljnKm8KSLgwGuObCniun8L/i2RH/pfl7cpUXyfyH/ NKkLfi/PwjaNge1f0Yf7mspm3yBMfmdJc++fI7JzLlztxb/ThdE4xsZx32CNH09Nrh 8w9dwD5L4hKYA== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Fri, 07 Jul 2023 22:06:31 +0200 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Geert Uytterhoeven , Michael Turquette , Stephen Boyd Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH] clk: renesas: rzg2l: Simplify .determine_rate() Date: Fri, 7 Jul 2023 22:06:27 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770794003099219196?= X-GMAIL-MSGID: =?utf-8?q?1770794003099219196?= rzg2l_cpg_sd_clk_mux_determine_rate() is the same as __clk_mux_determine_rate_closest(), so use the latter to save some LoC. Signed-off-by: Christophe JAILLET Reviewed-by: Geert Uytterhoeven --- drivers/clk/renesas/rzg2l-cpg.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/clk/renesas/rzg2l-cpg.c b/drivers/clk/renesas/rzg2l-cpg.c index bc623515ad84..255920c064d9 100644 --- a/drivers/clk/renesas/rzg2l-cpg.c +++ b/drivers/clk/renesas/rzg2l-cpg.c @@ -182,12 +182,6 @@ rzg2l_cpg_mux_clk_register(const struct cpg_core_clk *core, return clk_hw->clk; } -static int rzg2l_cpg_sd_clk_mux_determine_rate(struct clk_hw *hw, - struct clk_rate_request *req) -{ - return clk_mux_determine_rate_flags(hw, req, CLK_MUX_ROUND_CLOSEST); -} - static int rzg2l_cpg_sd_clk_mux_set_parent(struct clk_hw *hw, u8 index) { struct sd_hw_data *hwdata = to_sd_hw_data(hw); @@ -250,7 +244,7 @@ static u8 rzg2l_cpg_sd_clk_mux_get_parent(struct clk_hw *hw) } static const struct clk_ops rzg2l_cpg_sd_clk_mux_ops = { - .determine_rate = rzg2l_cpg_sd_clk_mux_determine_rate, + .determine_rate = __clk_mux_determine_rate_closest, .set_parent = rzg2l_cpg_sd_clk_mux_set_parent, .get_parent = rzg2l_cpg_sd_clk_mux_get_parent, };