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 53A193358D1 for ; Mon, 5 Jan 2026 12:14:50 +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=1767615292; cv=none; b=ayq/ikj3vTWJGqDRvkKmJc+W1dn7d9Rss9LPEObTKEknaQJy/17uSNM5qrS04v/YaVRTRjIgp9DOM3nErY1MPrh69O5kOj4UvlBX3FOOHBnb2YEWD+6GYI3LkQ8YyN8YbWdBm9M9lKmHQYUpYmfoNsRlr3Ta5WpE91o6Vjk4T6g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767615292; c=relaxed/simple; bh=uKFtlxDPbtM+Fol0L4Q/FHhGcnWg7hf0UN7T6Y28eWI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kK1WQQnc6mfdIWlZ0ImoLna55u+wxXT43MY3tVucbaMQ9MmTdopOCB7MTQbbEihRjkXEC4Zvrfd1n7iOzKhSPF5HPzc14WmN1IaybtrR8Iz+rk50PTbCJjhBePuRUmwNy+wu7jCO54qTUy3dQW0RJ6bERKu0d06miFNpJ4Z/Rrs= 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=CL8esZY1; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=j5N/rbvu; 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="CL8esZY1"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="j5N/rbvu" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1767615289; 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=pALCUxgG0Sih3gS1zvT5EYeP9u7uxFAHJ/wplVNqgIA=; b=CL8esZY1GYAaPV/IZ7WsWlwGBj13y/IQcaqsIRArVMNb5/Q+NTkVPMf6qcDry5aokXap+e Qp3p7aLxStjtEwdF7suBn1LLJZHAcxe29ykATjuPh/UQWkCkZjh/RbkOKXgCNOGU26R51K fLMcj8qiKFH4EZ8ys6ngGpc5mZR7w5M= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-613-TR-tnjiqNKy_XTAfWL9ebw-1; Mon, 05 Jan 2026 07:14:48 -0500 X-MC-Unique: TR-tnjiqNKy_XTAfWL9ebw-1 X-Mimecast-MFC-AGG-ID: TR-tnjiqNKy_XTAfWL9ebw_1767615288 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-8b2ea3d12fcso2321049485a.0 for ; Mon, 05 Jan 2026 04:14:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1767615288; x=1768220088; 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=pALCUxgG0Sih3gS1zvT5EYeP9u7uxFAHJ/wplVNqgIA=; b=j5N/rbvuqUv8PkAcQvXVmF61HWxoPv1WWGi65qjpLFf/H2Y0xLnw55cIz7NfQABaC7 RpXclsSvwztjUA3l56jItNnKRJRnlUvsu1c6x+8GLjJw1xvNE26t/ZiQgqrq1KYAppRp wgQJ6j0Cc0SvSrA17ER9hdBClDMTvNRrnsoOo6uAQSkWwg80fyqEUvcjt1Udui2PMQzy tGl+BT8Popbx/Jk/6WFozxFaFcQ0tRFqNOPM8UVgPRgtahVhISgeSdkKmXtowWfp9mtN uFFym4SEo7Nu69Z7MAD2hYPsNHKWz8C3/Z7Pv9fVnK2vqPAvc1sFljvH8WkzwGVXO0rv XrSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767615288; x=1768220088; 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=pALCUxgG0Sih3gS1zvT5EYeP9u7uxFAHJ/wplVNqgIA=; b=MD5OGi7mvZF0VoZslR3c62ZVazikL724Hz2OgFdA2J1l17RYa54n5H3+oTzboeqkBd M/bbwAWDO80gExLr+42rZNs4qU0lmhaFV51lF8b6bMF/HKqlNMhNnn55+aDlKlF1En4B Lns2cXCerthRlRkGAHONuOIIqIYj84zkh+gPMs/8+KAjxMfW6MAnStOo2hBzSw9OpUcL dKcIQcHgxYhDcrgrlDrhNo7N3iJbvvAAB8MEgjnUkdRa7jPbykyi955IOajyHykwYSUR s9aFs6cHnAIJazKWlG7FJv6GiXlK8wibrJc1McWsvmieUp9Wur2sZ9v0MYMSY5zYKlOx wXdg== X-Forwarded-Encrypted: i=1; AJvYcCVvWXeJLPyxbhamh/F3c7mdHD9F6GchHeiwsVAdl7PjwhCLUEQgvTU1AaqhVu9+oHmkSXZ920HQRVPHLLg=@vger.kernel.org X-Gm-Message-State: AOJu0YzrYm+qjmUueHm6hq5222qhopNqrxEda5td5KYi3GZKLV2WEFu+ L0NabQjjURRsf1Pt0igInOWiwi65wGGKRolGhHuaPhM9NIyFyuiZzKWyrhafaukZVkIHlgLNMhv vzG+yQ5aJMNquksUCkeTtvJu2gPQPYqJLinglVFTiap/0Vqh8BxZZNZzbtcYobzckbg== X-Gm-Gg: AY/fxX5zzCa6HuVSnuAmy5O+ZWhdZ2sQ60etGhx194jHmoRy7bK3Erh8BvV5K1DrgfV grf8QpmyqKAConmDZc4wEGyqYHuVmYI0CQ17e/KbTRnW0AbYs215diqHYtHYPwUCcS1Ry9iV35R SYTR8EQjVvxF8XAbh3PFnyQsSS9hT3MzDk+f0d0YQ43TWdHFjSZdNQnYRz3FObt6oZiHfmFwLHj 9V09O1Ev+11YG9IoBF4Bw4GIheB96ByzZs4SrVkqtNJjIdGQO8Se1ZwJ61isyuSyIGhGZ/o1By5 6acZEKLapo5XlCOKz5BJNgFgaAZ82swnRth7esHj+928pdv9R/6uFwxSEhHqj2dKyZaJmsyZAxc e/BJEPQu1aX5VXIdVz7GilBhjf49LgM/sQNxZFBGJDTjy X-Received: by 2002:a05:620a:44d5:b0:8b2:d6eb:8203 with SMTP id af79cd13be357-8c090501db3mr7123132085a.69.1767615287438; Mon, 05 Jan 2026 04:14:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IFX37kzKtyI4pVa2B6zkJ45mbfVDYf5b4bq6gq1EC+G2OfHkde7TEgVCraCyU1NH7StTtKeCg== X-Received: by 2002:a05:620a:44d5:b0:8b2:d6eb:8203 with SMTP id af79cd13be357-8c090501db3mr7123126885a.69.1767615286882; Mon, 05 Jan 2026 04:14:46 -0800 (PST) Received: from redhat.com (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8c0971ee247sm3701650785a.27.2026.01.05.04.14.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jan 2026 04:14:45 -0800 (PST) Date: Mon, 5 Jan 2026 07:14:43 -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, 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. Brian