Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1284149rwr; Wed, 26 Apr 2023 12:37:49 -0700 (PDT) X-Google-Smtp-Source: AKy350b5p8Jnpa98xvZB5i0u6mkSfqsQqSbbauQXi9oavfAFpGtmTUj1pIj9lzs+qmzC8eIB2Xc1 X-Received: by 2002:a17:90a:c687:b0:247:54c7:1bdd with SMTP id n7-20020a17090ac68700b0024754c71bddmr21617116pjt.22.1682537869219; Wed, 26 Apr 2023 12:37:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682537869; cv=none; d=google.com; s=arc-20160816; b=r4So9YdugfjcZ3PUIaJpJ+scmFpe2sjj9EI8EMHniGK+dE3GYyDAMjSi55SPA0FzZu KWcoLzA2ikxBQEMLT8/HxC/bm4Hwlyq5rKWSmtEglGgRaE0BgPdCPA34vLlwjFjeYBLC eSJ5e31NL31pgUrkTKVL8LtYoFC4z3ITtkXmgIdbdlbaky3fBTNl7e1qlrHnD3KFSL/0 9KeW+o2Nuw7tjNcy4nw7LZt0acVlpFfnhyuIMYV2QhF6v8hKKLYoxsxItkCyPK7TC6Du wra2JlXhGCpnJF5qYq5CeMohaMU+5vxhVtXFPw30r0pOMFd1233JxWE/IHmhMpKDGWvN Fm7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:reply-to:cc:to:content-transfer-encoding :mime-version:message-id:date:subject:from:dkim-signature; bh=rL4MSO3LUW3HwJgVP/1AlVzfIRo5vm59yDKzOZUjPWc=; b=dcqa1iFDi3KOf3mWbMqVJxhjb66MyfF6RI3TMjmfQocvSxvIOqArcF6xWOfpm7o/nx VmBKIP30EimxfGxb6A4ZeyNYjyXCiYJldZX5bW8XixX4CJDERmcwctfRsIBkBe847Puk TsbCeRCcxCLKt5bYowYfcqunQY4+kbZy9fsTD8eknSju3KYGzrQymWnro/ZQszawUVpb FqLqcKQp4DboB+EITRyh/3aAacZ0vlASY4sjquTN7OWDwIOWQ+YWwk5rnaUifEcuXDDs SPONwidE1bt40foCy4hflVpI2I64EqQbBzk56GLcWFPwtmAyPOfB2l9AUOyTlVrWw2DA Pvlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pfzsV7xK; 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 ck13-20020a17090afe0d00b00246973aef88si12913219pjb.29.2023.04.26.12.37.33; Wed, 26 Apr 2023 12:37:49 -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=pfzsV7xK; 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 S239494AbjDZTeY (ORCPT + 99 others); Wed, 26 Apr 2023 15:34:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232651AbjDZTeW (ORCPT ); Wed, 26 Apr 2023 15:34:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F3172684; Wed, 26 Apr 2023 12:34:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 37E6E6199C; Wed, 26 Apr 2023 19:34:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 8AEF2C433EF; Wed, 26 Apr 2023 19:34:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682537660; bh=maf6/BWfgU2ncGnj6zGDd1S57xHd7EW9VanLw4HM0lQ=; h=From:Subject:Date:To:Cc:Reply-To:From; b=pfzsV7xK93wyHSvWTzOB0YRU4/NZX9qX1+l3l7/2bIkLSIBKJTQXmAzM6ia9cWCEf P864cAoStyXbLvEeFkytVU3LPp0vztcVgWFO3rY9hrz2wMV/ZLoQZA9satUjzyepGx 4GOQ8JovFOVA/m4GhWXcdpoQwASoP4nTccq/YWcENxBYnYsLK8gyYGay0APdnXsdqg NlCBK9VnFnhXirv8PHlN9ROLr6I0mnUXX976U+P++p6KK7DNDLJYNJ0/77rEwv1AL2 ibzy3vk5LbtSCUUDMNQIIOZ6/m8u2ovIYV9CJ0ydM2oREqm+jMWRmzI6mUCfuiNFW/ I+9ja4NjKk/pA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C7D0C77B7C; Wed, 26 Apr 2023 19:34:20 +0000 (UTC) From: Yang Xiwen via B4 Relay Subject: [PATCH v3 0/2] clk: fix corner case of clk_mux_determine_rate_flags() Date: Thu, 27 Apr 2023 03:34:15 +0800 Message-Id: <20230421-clk-v3-0-9ff79e7e7fed@outlook.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIALd8SWQC/22OSw7CMAwFr4KyxihxSpFYcQ/EonEdGvUTlJQIV PXuJN1VYjn2e2MvInJwHMX1sIjAyUXnpwz6eBDUNdOTwbWZBUrUskIFNPRQV1SbmlFRa0ROmiY ymNBM1JXs2MSZQ1m8Alv32fT3R+bOxdmH73YtqTLdi5MCBcacpbZokay++fc8eN+fyI+iGBL+a SFIuOSfiBBV1ap9a13XH1Tv8/znAAAA To: Michael Turquette , Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Xiwen X-Mailer: b4 0.12.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1682537658; l=901; i=forbidden405@outlook.com; s=20230415; h=from:subject:message-id; bh=maf6/BWfgU2ncGnj6zGDd1S57xHd7EW9VanLw4HM0lQ=; b=SIb8BOsguv8fnRlfotQhfHQXWXc+E+Db4OKYO/BHbSNJaXC/Dr9OX7sk8NwFAZYgTBvkng8C1 CXt5kM/XsQxDfudX6xYcK+gn2tcJp9Vm/aWQRoX+4aAaAY3z+Prp10V X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=hfdpPU3AXR+t7fdv58tXCD4UzRNq+fop2TMJezFlAhM= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20230415 with auth_id=44 X-Original-From: Yang Xiwen Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_REPLYTO, FREEMAIL_REPLYTO_END_DIGIT,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 Signed-off-by: Yang Xiwen --- Changes in v3: - Add many unittest functions for mux determine_rate - Add more checks for ULONG_MAX - Link to v2: https://lore.kernel.org/r/20230421-clk-v2-0-74c6cc2214d1@outlook.com Changes in v2: - Add a unit test to clk_test.c - Link to v1: https://lore.kernel.org/r/20230421-clk-v1-1-bb503f2f2cf3@outlook.com --- Yang Xiwen (2): clk: use ULONG_MAX as the initial value for the iteration in clk_mux_determine_rate_flags() clk: tests: Add missing test cases for mux determine_rate drivers/clk/clk.c | 13 ++++- drivers/clk/clk_test.c | 131 ++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 141 insertions(+), 3 deletions(-) --- base-commit: 76f598ba7d8e2bfb4855b5298caedd5af0c374a8 change-id: 20230421-clk-64c6b6e21cdb Best regards, -- Yang Xiwen