Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp115183rwd; Wed, 14 Jun 2023 13:05:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ58s3WlrMece65rKflkPqHY5Rqdg1oGoSlKjCEzKv+ReOcLwxEzDxE5mW3xBWxbpJbEk8OU X-Received: by 2002:a50:ed95:0:b0:518:9119:f974 with SMTP id h21-20020a50ed95000000b005189119f974mr2652053edr.27.1686773149000; Wed, 14 Jun 2023 13:05:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686773148; cv=none; d=google.com; s=arc-20160816; b=YMc1zrzrpnEb/q5uS4K6HwGhYJb0wdRohKiG9CAZkSHUH8j8wr1wa0oY5x0lIZJ78b nSgBxgqxl9b0tmrX8WEsjl0k82WgR3v/0CvmZstMMEk5+1LycmUb0PJsKf4B6jo2Pctn bfeG/w5RHFq8UJHkvgvAxyjUJ86sezsIpVLDTBQqch74OQn5BLxisc7p1OH55Qqjzea1 LkGdGTE65/EMvbiHCFTM5R/+QJUdyiqFALwYNrVK3hh9k1ZgVKgn2s5mWniMcffrmhP0 UeMnQCJnrVusngAd5z6mc22oPcxuH+QV1QUvYT62NbL4luIpCqQbitLmx5JtUrAog+v8 dNVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:date:to:cc:from:subject:references :in-reply-to:content-transfer-encoding:mime-version:message-id :dkim-signature; bh=Kt6SJawEmJWtX3OTbjlzR1/a2xexuFr4PgAMHfuqpqc=; b=yZWNTE8eIE5jt/i9F+xTJECIsSm8SaVTgK5Qrf+LBtKRJvoLcfh/dyShjvx1joh7rT NiqVybE4/uz5D2DuzeYlx36Ih06irawWiRILq23bc3yvrM8AZV93uWmktCjSO68yk4iG SJHBLVZyClAwye1jLq2XSAjSgllGqF0scUMDJ8jAACivOaE0jiCeRVAzz4hOSqlxtZJO eKN7keU1/R8IyhzlS08gcJiPBnl8VrJIOOMcCtPczHa75G+GvJn6LXTCBJGfs2KAMkQD uX116QUBOQ5wGrkv6TkoWt9Joo3fcQl+QQI1I+SUDtpRvktuYVPbDOO0ZtzWfxVnBsZN cBUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WHhPJGi4; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c9-20020a056402120900b00515f14fcf58si9515606edw.85.2023.06.14.13.05.23; Wed, 14 Jun 2023 13:05:48 -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=@kernel.org header.s=k20201202 header.b=WHhPJGi4; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235697AbjFNToD (ORCPT + 99 others); Wed, 14 Jun 2023 15:44:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234534AbjFNTn7 (ORCPT ); Wed, 14 Jun 2023 15:43:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 998CB26B5; Wed, 14 Jun 2023 12:43:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 35CCF62EF0; Wed, 14 Jun 2023 19:43:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81F90C433C8; Wed, 14 Jun 2023 19:43:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686771814; bh=Kt6SJawEmJWtX3OTbjlzR1/a2xexuFr4PgAMHfuqpqc=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=WHhPJGi4JCpDvJJVFMj2VPcwyd1dt4StdWOi6o4PJtoNbC2BpPlPK2y3X158vC85D i23nKtAzDelBVt/aLueNY1b/3+Ay2ilRlKZD2dCW92xnFftZnatfROwuM9V+g4TQXX xJqubh6K+F6j89Y9UuAnl2CBKPsYLnMo2IOk9ly/QOw6Hfy57XfiaOekY90XvhcF1z ZJ1hNMNMn9atmTQrdC14xUDP7FxW/UO6cOq3hU9fa5TygZ9Z78GFCV+qnsXFOINW6E KhD7/BWp2Ew7u1TuqNQ5x7HKgxKuB5VIY6Fzryy9+Z3lEtJquqn4vqPEzpS2VmoUyH su/okyOh3be5w== Message-ID: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20230613195443.1555132-1-sboyd@kernel.org> References: <20230613195443.1555132-1-sboyd@kernel.org> Subject: Re: [PATCH] clk: sprd: composite: Simplify determine_rate implementation From: Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, patches@lists.linux.dev, Harshit Mogalapalli , Maxime Ripard To: Michael Turquette , Stephen Boyd Date: Wed, 14 Jun 2023 12:43:32 -0700 User-Agent: alot/0.10 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Quoting Stephen Boyd (2023-06-13 12:54:42) > 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 > --- Applied to clk-next