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 5AE22CA0EDA for ; Mon, 11 Aug 2025 18:44:41 +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=rcv2pSLmpxZbxzMPtPIZhYDgh/LWj3jr/NlZtUzPP9E=; b=bsBZ5X6sPk7fMU W3d45VxLpKy7usQSIMTSIt5KYfCMj1zxF12zmZyiyfeGhTtXXH3rY4eDvonZOIKAkA1DxlClb4ERQ EA3d8hpuijCZc3zghOYqb4J+l+70vXP7lmo69AZ0Jod3tPuNe3mFq7BC+iGehgoAr99jq7NOsaKxC mBbyW8hJKsmGcE66Jcx+f/KffsEjzylKeeJ3ibDoB/OhVBYSrVw5nZum82pv9zP2TqvHyEfqL9pJm a0DtXJe+H91CC6UuHTNA8qj/EJJcGc7oMgbpx1rSEilfLY1igSp5MGWWpj93y112SqckbSoOLFdSL rC0UE93bESjP82YA2Kyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1ulXVb-00000008p16-0cnP; Mon, 11 Aug 2025 18:44:35 +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 1ulUuA-00000008IhK-1Jih for linux-riscv@lists.infradead.org; Mon, 11 Aug 2025 15:57:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1754927865; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UPMcKR4Oi745bR8iqUsDP5qg1uYaCMtbYLompUhICNQ=; b=iN2EhbD90ie9CgoZVivdz9sre9b3D2VhxMFSPXr82443LS5XVYsBZBJS3GaenR1zqD3r3r vNVf5vXrUJvYkljprd2yRlwZ+anMLZaWze/RNW989bOQiHjwcqdO0PgG2YWDAGGMfA6ngH Kn7kWXLB0lDk8wsaPK/R1E2LkxSfqks= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-531-2bfLE1zJNCK8-8XEj30dKg-1; Mon, 11 Aug 2025 11:57:44 -0400 X-MC-Unique: 2bfLE1zJNCK8-8XEj30dKg-1 X-Mimecast-MFC-AGG-ID: 2bfLE1zJNCK8-8XEj30dKg_1754927862 Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-7074bad04efso100711846d6.1 for ; Mon, 11 Aug 2025 08:57:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754927862; x=1755532662; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UPMcKR4Oi745bR8iqUsDP5qg1uYaCMtbYLompUhICNQ=; b=d1+sW/7Zyt+2z8sD6N9pWXNjyi9+lZ9WiJi8xChq08nAkXeTyt8VRZ2FITcriB0t1z NUQnuGVJbLTG6/o2pKRTf4jihKPiIIWiVjW20zpZ4AELUh6QAq7HeGT1kWCL0NBdwQpl 1xa6/XjFKZc/N7YZS+T8kOjD+qvMQYK+LjrwuNxIfncqtTc8UJCJRCgW0+mp/48HeeJr waXfUX1krw0HwH3IK8xkBcJyZ2G9Or0Icm6ovXOk/Cp1SSoI6XbjFWcIU1fpi4vDh8Su ycfQ4lN867U1Wd8X+lTmdgWO3bmTyYVZIm+uWzOMXe/3R7lzlL3hwfRE2wxXUfHeytRD 2dqA== X-Forwarded-Encrypted: i=1; AJvYcCXp4n03zKyBVXQTE+aeTT2xMeI7TzcdHnpInZ83okHpx4xuULzSOOl52uIKh/BLlBWhcUmQeFhhiAIzpg==@lists.infradead.org X-Gm-Message-State: AOJu0Yy5aKtMNVUzywzuasnVlr2hqUIKYWDRTp6EpUQ3IJn1d+EnjsUn uQNzHRHN8D6F7UIKp6kUZaNdbfa5YKO18eNemN4F5HKrN2R0gdCwYliXfUeiT3TkwwR9qw5hMt6 yE1NKDRnN0rzk7t5HoaYkZe99hMHwTaY7uC60o7xmN3gZjYD66Zczv+bKx1p5BNNXbL8R0g== X-Gm-Gg: ASbGncs4i9ekULPvKI3dY04XnEjM6XIdgHSVH3E0HFWv70zEWo0vfUxlIB2yOP5JkrP k3ZrwgR9LqojGSdslm/fyTsw7q7ackGb3OOuPkKw8bw6/RgO4zxS+7Q+llNSnkE5sDc42ptD/OY TCSO1OnwFhs4QRdDoDAr2Mp7nhrdxOxXRkzeihem8CqcQJgx2mMD+uw2TA+obnYRPmMKH/U+emW 4EUSwI05lV0Cj85K6W3v2ll9zR4samGgiJTHXeegBVwwtSsPE45uRrIEodEcksbx6frBWHGbuLf mHzp4Jvk8amQ5zhGBAnojUNW5tbRpjxSVwa/IEkUBO+OmEaDoIi6CRrkop8dQW4= X-Received: by 2002:ad4:5fce:0:b0:707:612d:3adb with SMTP id 6a1803df08f44-709d69b2c0emr1134916d6.18.1754927862174; Mon, 11 Aug 2025 08:57:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE83iNLxuXWBRGJIeIFUZHblancM50VRXiEQcjWFBbyuLTm1IZWPJbr6gZfh6Uj5SzS3+J40w== X-Received: by 2002:ad4:5fce:0:b0:707:612d:3adb with SMTP id 6a1803df08f44-709d69b2c0emr1133886d6.18.1754927861515; Mon, 11 Aug 2025 08:57:41 -0700 (PDT) Received: from x1 (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-7077cde5b4esm155566456d6.69.2025.08.11.08.57.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Aug 2025 08:57:40 -0700 (PDT) Date: Mon, 11 Aug 2025 11:57:34 -0400 From: Brian Masney To: Alexander Sverdlin Cc: Michael Turquette , Stephen Boyd , Sudeep Holla , Cristian Marussi , Chen Wang , Inochi Amaoto , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Paul Cercueil , Keguang Zhang , Taichi Sugaya , Takao Orito , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Jacky Huang , Shan-Chun Hung , Vladimir Zapolskiy , Piotr Wojtaszczyk , Paul Walmsley , Samuel Holland , Yixun Lan , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com, Orson Zhai , Baolin Wang , Chunyan Zhang , Maxime Coquelin , Alexandre Torgue , Michal Simek , Maxime Ripard , Andreas =?iso-8859-1?Q?F=E4rber?= , Manivannan Sadhasivam , Sven Peter , Janne Grunau , Alyssa Rosenzweig , Neal Gompa , Eugeniy Paltsev , Ray Jui , Scott Branden , Broadcom internal kernel review list , Max Filippov , Matthias Brugger , AngeloGioacchino Del Regno , Daniel Palmer , Romain Perier , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Bjorn Andersson , Geert Uytterhoeven , Heiko Stuebner , Andrea della Porta , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Alim Akhtar , Qin Jian , Viresh Kumar , Ulf Hansson , Luca Ceresoli , Alex Helms , Linus Walleij , Liviu Dudau , Lorenzo Pieralisi , Nobuhiro Iwamatsu , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, sophgo@lists.linux.dev, linux-mips@vger.kernel.org, imx@lists.linux.dev, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, linux-stm32@st-md-mailman.stormreply.com, patches@opensource.cirrus.com, linux-actions@lists.infradead.org, asahi@lists.linux.dev, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, soc@lists.linux.dev Subject: Re: [PATCH 048/114] clk: sophgo: sg2042-clkgen: convert from round_rate() to determine_rate() Message-ID: References: <20250811-clk-for-stephen-round-rate-v1-0-b3bf97b038dc@redhat.com> <20250811-clk-for-stephen-round-rate-v1-48-b3bf97b038dc@redhat.com> <9379f132e52c972b2735cad768242cb784b0ed2b.camel@gmail.com> MIME-Version: 1.0 In-Reply-To: <9379f132e52c972b2735cad768242cb784b0ed2b.camel@gmail.com> User-Agent: Mutt/2.2.14 (2025-02-20) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: xymfLDJtzT56eq01OmjAw4oyKVGJnBaudR07aRIgD70_1754927862 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250811_085746_434046_52C51CDD X-CRM114-Status: GOOD ( 16.16 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Mon, Aug 11, 2025 at 05:45:57PM +0200, Alexander Sverdlin wrote: > On Mon, 2025-08-11 at 11:18 -0400, Brian Masney via B4 Relay wrote: > > @@ -192,15 +191,17 @@ static long sg2042_clk_divider_round_rate(struct = clk_hw *hw, > > =A0 bestdiv =3D readl(divider->reg) >> divider->shift; > > =A0 bestdiv &=3D clk_div_mask(divider->width); > > =A0 } > > - ret_rate =3D DIV_ROUND_UP_ULL((u64)*prate, bestdiv); > > + ret_rate =3D DIV_ROUND_UP_ULL((u64)*&req->best_parent_rate, bestdiv); > ^^ > May "*&" be redundand? Yes, I agree that needs dropped and something I missed when I cleaned things up by hand. I verified that this is the only case in this series, and all of the other series that I referenced on the cover letter, where this occurred. My Coccinelle semantic patch has a case when the parent rate is dereferenced, and I'm not sure why that wasn't converted here since it works elsewhere. long round_rate_name(struct clk_hw *hw_param, unsigned long rate_param, unsigned long *parent_rate_param) { <... ( - *parent_rate_param + req->best_parent_rate | - parent_rate_param + &req->best_parent_rate ) ...> } I'll wait a few weeks to send out a v2 to hopefully let big chunks of this series get merged so that I don't have to send out 114 patches again for a v2. Brian _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv