From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE34E334C2C for ; Thu, 8 Jan 2026 21:23:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767907433; cv=none; b=XjPeCOtGtbh04kH9IGQrVnRkZgzMNJIy0BLWrh8FWOKiJVNCM7CVCNRgM/ovjWc+A7avYhi+2LkagJJ9RwJ49dmHcU9QslMHcjzOAqii2RPUgXuetjAXmio/EgWxHd6WWtNC4NnZukmuZ/IEzI3JrlwLCbjY2LTocPOGyF5w0wo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767907433; c=relaxed/simple; bh=E8Mx273ImMGVdhCe31382iXpT5eY52kRrfdRCzimLTo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SuCBlzVJus3eBwETd1oTCLynutShOqvnWXnNPLr7rrXpP+DDhl+TwID9/EdoJa3/c5Im4lCkdpltPxAKbSNzss8uICAceljhKkOniR0mVAmq93rxQrub5OOBvAsHNd6T2qA4P6C4g/pqFo3F/mM2c/QC/BnFsVv0VBGxMhniiF8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Uf7uzfNJ; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=lIdGqlHX; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Uf7uzfNJ"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="lIdGqlHX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1767907431; 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=Uf7uzfNJ3+JSJCkeGBiusv/Kt7p1mxr2a1YeOLNrN0ZKArxnRyPkIes1TQa2m9iE2nTc/C FtR2nf/nN65TFVxroidR3GAK+iYvvB13tMCHsTz1LLABaX/oMMRxaV0u/DrVRLjLy9QTcb 9hJYP+016PKwfrm1ol4yQuFj2QV5Qrg= Received: from mail-ua1-f70.google.com (mail-ua1-f70.google.com [209.85.222.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-215-vnKzbJZHMWe0tQ4UXD84Kg-1; Thu, 08 Jan 2026 16:23:49 -0500 X-MC-Unique: vnKzbJZHMWe0tQ4UXD84Kg-1 X-Mimecast-MFC-AGG-ID: vnKzbJZHMWe0tQ4UXD84Kg_1767907429 Received: by mail-ua1-f70.google.com with SMTP id a1e0cc1a2514c-94125ded3dbso8232499241.2 for ; Thu, 08 Jan 2026 13:23:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1767907429; x=1768512229; darn=vger.kernel.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=aMZTdMgEwkPQanj/a0OAHfxOFan2ydElF0bb71YGl8A=; b=lIdGqlHXPE83BwqAvpSEQ4bCGh3nn41jiM4IGnhJ1K1shQl0WQz7bRDtnci7sAEuwV n25gBT/kVw8Ho2ygFqzu7vomgUoFIvF7igFTWYxQZkBIMRiha62AUON3t1eBgzxZWBqV U0gKOf1ogQRN4w+mTSv/zCkjj3m/iyKndNul3zmbGuivxFBkvrpuHdCD72gu3tiqAdDF lQQ2Q9ohUpPAsetf5FUUOEntiSeeoP4S2lD1v6s7KRyYiOIcamfMhSGtl5K7BJrcm6p7 STdX7rzbYazusZRzfQGMiLFEwo9pFSVNxHDJjGgdIYw2WD5uad4IaI8/3a3pCpvkTxyP XWFA== 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=PUDqQZrWsxsJv7yOYJh+I1gC0n0pVsj4qAImFStzGRKnkVvNl85N0xST4BZEUS9rLw +ZdbPQne5fZEd3Px/lMKvSc4VOgkLH//x/avSMhho7hQC8L9GNCdTREyywLZceMX9Wde bEnnK6mUV21pF2HYj7nHQAgVeo7xUUA+6LB00PIhED6nvdz/oAK9tpfREXgdxn+JTqTN G6FRjSaA9q2b+Y20LcYJEjfP7g7K86jeSDZUCOhhZCccTBlqVVnA9v3M1yKJPgPbwyuF IkkAr6MxXNOmrEtM7FLiSDqXKtw8wPQQpJq0VELNbG2eSdFgYVBb9OkG8ajrKrREwoaO 8e4Q== X-Forwarded-Encrypted: i=1; AJvYcCUhvN7cBlxUh9U4a+ZkU9zBNs1DowJgxXvdkVk0Exl5//y0xQcZquTJrG5qT13Bp6dlCiNdHLnRcrrX0GE=@vger.kernel.org X-Gm-Message-State: AOJu0Yzke8ArTz6xefM77AyfANTXETKQTU7PyRd/0/T3P9XZftS5RrlH O9zYrroP6KXIDhLep1NTbNdx6tvz8BZi8qiiupQsmRGFw9gq8fkCnoUUUJzZyErNvrvOVTxAyq0 MxZHGVMukyLhApmDdVEOviRVD/lgTCFNErDhGTpJHHNfOAJLCRvUQLRGQyHYkwGWRUg== X-Gm-Gg: AY/fxX61h4lIu7dN2UWYeMsKTad/tdxlDSpRZq84vZiiasOFXXoy++IL/ZZSER9m55P t6GT9b/GYPwNFqiA0FrEZE70fPWUkCyxgiKOVWNSsNftaRnAREcy6GNIQH/Xq6Fgk++/R5wo3/a JZ5yhN3yLbxgcWfB4A6Ngh6MG9UUnj31+pqjLINfiTXtccCPGcYWp4yZmYNDgzovhBJBbp4a2Lm maVZmAmSdFLYHo+TavdNQ6R3rnuzfgaCuLsPQ+XC4K0k6acnkZWJi0GNZ4FGPl3rNk98oZyko+2 9/b0xqY3kugWhApZAOyvx5jVhzhmbH7WoT851HZNnQUMBx+SbJYnLClh4JYmtJwTygEwCfed9n7 SNI0B8/87 X-Received: by 2002:a05:6102:162a:b0:5ee:a76a:8513 with SMTP id ada2fe7eead31-5eea76a8724mr1006309137.33.1767907429147; 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.14 (2025-02-20) 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