Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2359847rwd; Wed, 14 Jun 2023 01:29:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7AY/zghsLiBSZktWUN8V0Zxk1KnUaF7+AdqFY+aw5Q0gurxLaiAWJIMh7s+aa8OCPaseA4 X-Received: by 2002:a05:6a00:cc1:b0:65c:402f:b247 with SMTP id b1-20020a056a000cc100b0065c402fb247mr1763808pfv.3.1686731356845; Wed, 14 Jun 2023 01:29:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686731356; cv=none; d=google.com; s=arc-20160816; b=fGtMu0M0tvwFZWLoc4Lof8mr1cGHYCvxtp8B8lbpRIcvXDeyPFq2zIwiJFTRePaCel L/P1BtmHg4nuNc1M0934PR+q4HAdCrI6lzRS3U+Avkj6ntiepAepYA2jSL8QKDGYRBLf pUt1jG5UZxfmrEX+rB1JRT2KgKD/vDaA3wzCW8+a0nAgdfSeaCsggAtnjTWUBBF9lo6N LE/ny+2xjsOgbV6vOZ1CZplUuQEzgsQDN7BUNyDbekCMfYyXyZYS0otQmriqzZCo4Zmm 2/sBAF4x5fY+dWN0obDBxuylwvAx9TU2OcFiv9xcGWK7tJPTQnltiHQ5LK2o562MuqGx I8lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature:dkim-signature; bh=1yEMxu0G9MwUKPOyf/FJb7HTbU6HblEER4OOakIzOqY=; b=ZM122S9Wfi+Ff/dyDHJe75wVbxZfW+BBKOMAzx5R3XaBRKAPDtBX/Nep8hXUVF1EM+ lySSluMc458nDIQkECAHB1fkNjttRhEaNMp2jP0ixaWE/tjnSPhtGXzA0Ty6lx+Va0Zr zw/db8BlFQo+/UtghPgliQ5Wjh6E5vEp9bCau5r18qHV+Wgf07H/WShBqVATFNcNIn0q nqGXA4zEOHaUhDZeTWx9rAwBgovj25VoB+ti4Cwl7QaCq3+Le5WSe2M/DsLzkmQ+Llhr ny4DWCQmmwUf4K+2XPF344cOtg4+QgkYH73+4YeC9TQfRMrefBZxf+I7ixp12NiZktEG Ckaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=fAX5C12H; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=crgIalSt; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x9-20020aa79ac9000000b0066644c4d739si996994pfp.60.2023.06.14.01.29.03; Wed, 14 Jun 2023 01:29:16 -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=@cerno.tech header.s=fm2 header.b=fAX5C12H; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=crgIalSt; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240126AbjFNIU7 (ORCPT + 99 others); Wed, 14 Jun 2023 04:20:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238969AbjFNIU4 (ORCPT ); Wed, 14 Jun 2023 04:20:56 -0400 Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D38DD1984; Wed, 14 Jun 2023 01:20:55 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 394F032007CF; Wed, 14 Jun 2023 04:20:53 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 14 Jun 2023 04:20:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1686730852; x=1686817252; bh=1y EMxu0G9MwUKPOyf/FJb7HTbU6HblEER4OOakIzOqY=; b=fAX5C12HUFFcTTPMdF Ir2pCY81OG0YZpJa3p7vFQwVoSm/uKg9BTuH51Kjvoi1If/QNTgJO4VUdOLW0ChD 7VE3a/cy3P6f86cBBL2DUvTJBBPFTLdpDwXiKu5gMrEc6nNYLrRKBAXBqqw2ZQpl w7FZ4AMEZa+0OwtA7IYMoR6EUSu+Ankts6JHthLO8oqTBeavaIe4Y9lWM/zwoQzU 2UjtSv/HaEmE49hWrJ2LEDY4TV9/QAALJB+VGeu8a8q68XLpga/6p8Pn6NqPsQ/u SJw2q5sQ4jDsUIRCejMkDf+Fhq0hKQ6FimceoCGurs70apYLi1Ogmzyva5yPrCLB VGAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1686730852; x=1686817252; bh=1yEMxu0G9MwUK POyf/FJb7HTbU6HblEER4OOakIzOqY=; b=crgIalStnsNyIrYG7VonJagMqQCiL t0a/6b3QL+Zi/5Ww70gohYNMC7dC73r/rdF/ll9rXN5iweF3iXrtz8dqV/wfyc7U nQvD7ogQHkIouU14/Y2pO3SjbuGFjZKjM7nbxMmjsNxaB3taRvEHqmCRkIGz38Q1 WkLKrCn+P03cf4g0OuDRk79WwAm+M9o5pb9xWoyFOq01PEP3y2ewFw2zyX945Yqa uOlYp/HwnB7qSaDXjDHkUFZRuiRPfX6X0pJgnACCRAOjVmQU2qMo4qtFmy0Wz4Cg MS21rdCmep7ggsYzW3uvrPvoMMu8qoLgmsPH/10DENQpSFoQclQh172Ig== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedvtddgtdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtsfertddtvdenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpedtgfdukeeigeeuhfelheeftdfhgfegfefgudeuiefhueeuleekveetvdei tddvieenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggt hh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 14 Jun 2023 04:20:51 -0400 (EDT) Date: Wed, 14 Jun 2023 10:20:49 +0200 From: Maxime Ripard To: Stephen Boyd Cc: Michael Turquette , linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, patches@lists.linux.dev, Harshit Mogalapalli Subject: Re: [PATCH] clk: sprd: composite: Simplify determine_rate implementation Message-ID: References: <20230613195443.1555132-1-sboyd@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="mxw7iuexgh4mfzjs" Content-Disposition: inline In-Reply-To: <20230613195443.1555132-1-sboyd@kernel.org> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 --mxw7iuexgh4mfzjs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 13, 2023 at 12:54:42PM -0700, Stephen Boyd wrote: > The sprd_div_helper_round_rate() function calls divider_round_rate() > which calls divider_round_rate_parent() which calls > divider_determine_rate(). This call chain converts back and forth from > the rate request structure to make a determine_rate clk_op fit with a > round_rate clk_op. Simplify the code here by directly calling > divider_determine_rate() instead. >=20 > This fixes a smatch warning where an unsigned long is compared to less > than zero, which is impossible. This makes sprd_div_helper_round_rate() > unnecessary as well so simply remove it and fold it into the only caller > left. >=20 > Reported-by: Harshit Mogalapalli > Closes: https://lore.kernel.org/r/45fdc54e-7ab6-edd6-d55a-473485608473@or= acle.com > Cc: Maxime Ripard > Fixes: 302d2f836d78 ("clk: sprd: composite: Switch to determine_rate") > Signed-off-by: Stephen Boyd Reviewed-by: Maxime Ripard Thanks! Maxime --mxw7iuexgh4mfzjs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZIl4YQAKCRDj7w1vZxhR xb+pAP93GGWbEXfcYr7b2IfwCcZ8pQzdNfiq+YAVx8HSZ907mwD/WkB8eWJwE4Fs 94TtOnmikPhnfB1hcx7EidWX+4mU3QM= =lYcZ -----END PGP SIGNATURE----- --mxw7iuexgh4mfzjs--