From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D2989D1D48A for ; Thu, 8 Jan 2026 21:24:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=z7NTg6XVPzK7EE2kIMbUYHN5J+a2gaTRAc/vVATw6kg=; b=ZGBZJXAnu5VQJ5 dqIUtvu4v4QlFJmIKEvlrbr9fa00zrgVTwP0NX+wVW66gA74SO394GXY+oLkfEXe84gi3rS0SxT+O 6Ji661JOerKNteEGwcFcSpZKXIUk4JqfsZKYFrHYML5VY1DgCSxFex5+qOJyaUcJhF3sCaCFrY+8D xKrlqd9bl8jdBgSOoP7xaZS/N530uAkfpmxsoa7a1a/yp04l9sANTX4qf9TCpNh8R5VN9TO2FLnzy zXm19fhdXmgKjAIeYRoJP4wVtCoZCNMZk+kdb3+M+ozazYOnpLWGfQMMaqVIXDXXO1ZmeZXAewwD5 G+P5U78pdtwYtqi5YyJA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vdxUA-00000000u8x-04wO; Thu, 08 Jan 2026 21:24:03 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vdxU1-00000000u6J-2TkM for linux-phy@lists.infradead.org; Thu, 08 Jan 2026 21:23:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1767907432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=aMZTdMgEwkPQanj/a0OAHfxOFan2ydElF0bb71YGl8A=; b=Hq0fA4N+cqq5uW394Dui+Ht3C2rZOOjYDZtJ81j+axlWSxyYXA+ns17NAWboTEiLxlmIk1 KuUgtimJlzcKiFVXnj5b33XDhHbEgOddlv7NFS9+9bjxWm02vswiA/v56SvNsvQsRK4FcW o00XhM+8nDGzAtF9A+2DB761u1UxCEA= Received: from mail-vs1-f70.google.com (mail-vs1-f70.google.com [209.85.217.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-203-ME0_GBXsNtOnLeQmEOTeUg-1; Thu, 08 Jan 2026 16:23:49 -0500 X-MC-Unique: ME0_GBXsNtOnLeQmEOTeUg-1 X-Mimecast-MFC-AGG-ID: ME0_GBXsNtOnLeQmEOTeUg_1767907429 Received: by mail-vs1-f70.google.com with SMTP id ada2fe7eead31-5ee83da1811so2875376137.0 for ; Thu, 08 Jan 2026 13:23:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767907429; x=1768512229; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=aMZTdMgEwkPQanj/a0OAHfxOFan2ydElF0bb71YGl8A=; b=SFIDanYDgOuDv/0EUy8F39Uvtz9t2mDtJx+t9xcvmaI/zifCRZWNZxbBx4q+qQsVH1 chOrKeGRPB1aTotnmAmnZzABmuUxOgPxQVsGTO7MVIJNbaDALOlDmjVDmQ1d/LwWDBNK h7MdpBerzMigOLghVn0dcYk5pYX8DNO5jXCxRdo57EK9llGNgTn9VxK/iD78+f69WBLr hSGA2O1Upfw6S6P8qCwYNyFHfj+h+JQdxoOyTLRMd9mIklurahxgfZNlul7kjKU9E3jF OUM2cyPf8k0wr+Pu0cgMFjUwtLYKxufEJCDgOCfIjmZ00aAjgeDctsMGXNzUSsm9bJl0 +R9A== X-Forwarded-Encrypted: i=1; AJvYcCXW9VDcyk2TDMuSbD4LTWVXUA2/xjzi02uP2Zv8QRQhcDhspZJAjWgP3rwCvvWyMLUbEfB2zY0b/Kg=@lists.infradead.org X-Gm-Message-State: AOJu0Yxi/S1OpCMMQXtllENKBX3+yoOLJE8HdMHm1/69uDz6+pqcXjaU nhJr1nLL6bNxMcxBc0iFSHrwfCeQoVl4ZDgtyVi9ALiwhda4E1iNGua6UGoVaglkKGkuANsNkU7 IRi4DY1kHjtN1SdcarNRNREgcj1FRZJA+aR0bKhJqT26jMB826iC3CDrH7S3sv2mMcD4= X-Gm-Gg: AY/fxX5dX4ymwwwrXANYpoVdpmgBGJTLxyWzI+itY1vxY/OKUeyNJikmZKG9X8P41n+ +XTTmLPJ4H24OPJ5IHCKpuX+XxCi/WRr4zDpvhZ8qCx3tRnlwBW0Ysheoql8aCZRu+tkLBdF4P0 7aDJ7rGPpNfwe2L45xx1JufyIZRLAc24RX4x0l8T9B9MUMgNjJiGOfExjNtF1wjpAWhyurBN7+Z JSo0d8KjYIDrafu/afkMnmC9O5G3uNpmTSWjvYhNpnyPDgBTnwFR67SS+hla796Y0En9jHOICnO /9e2DBggvd/rMF6hQwlvLjNNKjetE7zJg7cJ4ZRC82qDKe33xxsJcA22xCPBFxDk9PSfFLGryN+ VKSwL0dLU X-Received: by 2002:a05:6102:162a:b0:5ee:a76a:8513 with SMTP id ada2fe7eead31-5eea76a8724mr1006305137.33.1767907429135; Thu, 08 Jan 2026 13:23:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IE9+XK5E3OQPztXIo7GPKPfvpra0LA99i0XMQua/Tc/8Kj6tPqIGZY+3/QAUKTGxXE41kQHWQ== X-Received: by 2002:a05:6102:162a:b0:5ee:a76a:8513 with SMTP id ada2fe7eead31-5eea76a8724mr1006294137.33.1767907428708; Thu, 08 Jan 2026 13:23:48 -0800 (PST) Received: from redhat.com ([2600:382:811f:d757:daa5:b867:12a3:9d12]) by smtp.gmail.com with ESMTPSA id ada2fe7eead31-5ec772e322asm7790577137.13.2026.01.08.13.23.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jan 2026 13:23:48 -0800 (PST) Date: Thu, 8 Jan 2026 16:23:34 -0500 From: Brian Masney To: Geert Uytterhoeven Cc: Vinod Koul , Kishon Vijay Abraham I , Chun-Kuang Hu , Philipp Zabel , Chunfeng Yun , Matthias Brugger , AngeloGioacchino Del Regno , Heiko Stuebner , Neil Armstrong , Stephen Boyd , Maxime Ripard , linux-clk@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: Re: [PATCH v3 9/9] phy: ti: phy-j721e-wiz: convert from round_rate() to determine_rate() Message-ID: References: <20251212-phy-clk-round-rate-v3-0-beae3962f767@redhat.com> <20251212-phy-clk-round-rate-v3-9-beae3962f767@redhat.com> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/2.2.14 (2025-02-20) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: XM67jLejYvgVeKlo2fQUdOA2X2u9Imxle2CQFGhAn2g_1767907429 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260108_132353_733878_FC0B4206 X-CRM114-Status: GOOD ( 27.56 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Hi Geert, On Mon, Jan 05, 2026 at 07:14:43AM -0500, Brian Masney wrote: > On Mon, Dec 29, 2025 at 11:18:52AM +0100, Geert Uytterhoeven wrote: > > Hi Brian, > > > > On Fri, 12 Dec 2025 at 00:21, Brian Masney wrote: > > > The round_rate() clk ops is deprecated, so migrate this driver from > > > round_rate() to determine_rate() using the Coccinelle semantic patch > > > on the cover letter of this series. > > > > > > Signed-off-by: Brian Masney > > > > Thanks for your patch, which is now commit 27287e3b52b5954b ("phy: > > ti: phy-j721e-wiz: convert from round_rate() to determine_rate()") > > in phy/next > > > > > --- a/drivers/phy/ti/phy-j721e-wiz.c > > > +++ b/drivers/phy/ti/phy-j721e-wiz.c > > > @@ -934,12 +934,15 @@ static unsigned long wiz_clk_div_recalc_rate(struct clk_hw *hw, > > > return divider_recalc_rate(hw, parent_rate, val, div->table, 0x0, 2); > > > } > > > > > > -static long wiz_clk_div_round_rate(struct clk_hw *hw, unsigned long rate, > > > - unsigned long *prate) > > > +static int wiz_clk_div_determine_rate(struct clk_hw *hw, > > > + struct clk_rate_request *req) > > > { > > > struct wiz_clk_divider *div = to_wiz_clk_div(hw); > > > > > > - return divider_round_rate(hw, rate, prate, div->table, 2, 0x0); > > > + req->rate = divider_round_rate(hw, req->rate, &req->best_parent_rate, > > > + div->table, 2, 0x0); > > > > Is this correct? divider_round_rate() can return a negative error code > > (from divider_ro_determine_rate()), which is not handled here? > > > > Looks like several other users of divider_round_rate() use this > > same logic, and thus are affected, too. > > Thanks for the review! You are correct that this is a bug. > > I had planned once round_rate is removed from the clk core to post a > series to remove divider_round_rate() and divider_ro_round_rate() (plus > the _parent functions) since they call the corresponding determine_rate > functions. I'll bump that up on my todo list this week. I posted a series that fixes the issue you identified, plus removes those deprecated APIs all in one go. https://lore.kernel.org/linux-clk/20260108-clk-divider-round-rate-v1-0-535a3ed73bf3@redhat.com/T/#t Brian -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy