Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2239602rwd; Tue, 13 Jun 2023 23:16:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4qDoLihyVfMKQFoIFmre2zv4gaiYN0G/H6A2wVGqg/HCWGR1yZq8Fe3kIhUzibKz937/vw X-Received: by 2002:a05:6a21:6d89:b0:10b:bf3d:bc5d with SMTP id wl9-20020a056a216d8900b0010bbf3dbc5dmr617834pzb.47.1686723390002; Tue, 13 Jun 2023 23:16:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686723389; cv=none; d=google.com; s=arc-20160816; b=Zh/rwuxEEeewbnOXYeLcXgVKYhMbhZYwtrmuP8UcsStctZULHrG1t4VaafXqPl1tBA iJ27qqqcq29HdiFfg3n8hz4ntv7RiE8c/w3cj4OzQnqSHuWA71J8JLyh1CGnxQdxYL2/ 7dfJSnDS3CQ85BCtayifGaCoRuNBmDlq5fgcEfwNqrdn4lIFH+9r6ui06Es08MwDV+yR XCmPxFdwkGzJO3HjUdR0V8mqyRiUNOW8k330/+2tr0O3kf6MJs3xbWoEg/GCMxhqKlDp FEWo7BpqlJlhSoCUUIn+UX+GGgz00RJo6cs79Hfpc2DERgOWcpDqrREUg7EspXMnTLH9 5Ufw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version :dkim-signature; bh=ElKG9x2sSWGV2GPsWALMS5l/cikUTZOAPu/DfCVWTpA=; b=HDdLRZQXGwTWaUl39v4dM/m3vWULU//Mgp4am9oKgpJ4kd+6zHM0KONaolbwwwFP6j R7EBo9KTbZHMa2xFBevI59atzLwVgdLjkV0md4xt6FVimkbWiZsxmTYI9agHALl9Ga5P 6g+iEN+MX4RcTcox5MBpX0wGTu9Km2sbfB27GbHrgaWjPqCBp2F/tJgTkc7nmXm3fsbX KZmsjPdOhY8vyuFLC/QRN0Iaa6ZpgU/FfxLjfudThuwr0lLS7Y73acXc7Vmi7uIwXS7/ hFkZdm48vvYH2+QZgACEvf0/gjO/aAOsqiZEEr7CScSafLz1b2IASm+U3byGPKJjnIC5 QiPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (bad version) header.i=@208.org header.s=dkim header.b=srThXymO; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p15-20020a170902e74f00b001b3d1203160si4907987plf.650.2023.06.13.23.16.18; Tue, 13 Jun 2023 23:16:29 -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=neutral (bad version) header.i=@208.org header.s=dkim header.b=srThXymO; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234412AbjFNFp5 (ORCPT + 99 others); Wed, 14 Jun 2023 01:45:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233240AbjFNFpz (ORCPT ); Wed, 14 Jun 2023 01:45:55 -0400 Received: from mail.208.org (unknown [183.242.55.162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A87911BC3 for ; Tue, 13 Jun 2023 22:45:52 -0700 (PDT) Received: from mail.208.org (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTP id 4QgvXr71M9zBQJYQ for ; Wed, 14 Jun 2023 13:45:48 +0800 (CST) Authentication-Results: mail.208.org (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=208.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=208.org; h= content-transfer-encoding:content-type:message-id:user-agent :references:in-reply-to:subject:to:from:date:mime-version; s= dkim; t=1686721548; x=1689313549; bh=x9um8RhKCy7/xRgr+qA0V6DCZvo zgU/1cnaCwHpZPyU=; b=srThXymOP6NhU86+ixQu8Qu64EQMKFZLWbxEitzXadB 9nb8mJH4wfU8cyXxe4XnSJ+01LtVRYFHBUopm1qLld92Jmb6C3f4y6+Gyo+NyQqu XchyrnUJooKvn0G3h4N1B03Q/d9Jq3X3AiXxKzY5SAZe9FY7AGCbM413wG4yVSnO 3p22/jWIl7KW+AEZJw75XfW0HNADNmnad9o0Z2ky5TZ3+ZwuzxlVQj2VSPPy6A61 vMN2+bBHSBH1wyhBWh3kQ+Xk8xRFGnAU3trfQfzf26G7WfU/IaUgCygQT3+sacHt kAkz9FlYpFN2M1wk05hxmpjP7XSI32iK9kD8rHROdqA== X-Virus-Scanned: amavisd-new at mail.208.org Received: from mail.208.org ([127.0.0.1]) by mail.208.org (mail.208.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id PwB1Mx0i2BWO for ; Wed, 14 Jun 2023 13:45:48 +0800 (CST) Received: from localhost (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTPSA id 4QgvXr4pPszBJLB3; Wed, 14 Jun 2023 13:45:48 +0800 (CST) MIME-Version: 1.0 Date: Wed, 14 Jun 2023 13:45:48 +0800 From: wuyonggang001@208suo.com To: mturquette@baylibre.com, sboyd@kernel.org Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] clk: baikal-t1: Using div64_ Ul replaces do_ Div() function In-Reply-To: <0dc9409b662180ed29cbc281f0f076b7@208suo.com> References: <20230612033904.34921-1-zhanglibing@cdjrlc.com> <0dc9409b662180ed29cbc281f0f076b7@208suo.com> User-Agent: Roundcube Webmail Message-ID: X-Sender: wuyonggang001@208suo.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RDNS_NONE,SPF_HELO_FAIL,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 Fix the following coccicheck warning: drivers/clk/baikal-t1/ccu-pll.c:81:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead. Signed-off-by: Yonggang Wu --- drivers/clk/baikal-t1/ccu-pll.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/baikal-t1/ccu-pll.c b/drivers/clk/baikal-t1/ccu-pll.c index 13ef28001439..d41735c6956a 100644 --- a/drivers/clk/baikal-t1/ccu-pll.c +++ b/drivers/clk/baikal-t1/ccu-pll.c @@ -66,7 +66,7 @@ static inline unsigned long ccu_pll_lock_delay_us(unsigned long ref_clk, { u64 us = 500ULL * nr * USEC_PER_SEC; - do_div(us, ref_clk); + div64_ul(us, ref_clk); return us; } @@ -78,9 +78,9 @@ static inline unsigned long ccu_pll_calc_freq(unsigned long ref_clk, { u64 tmp = ref_clk; - do_div(tmp, nr); + div64_ul(tmp, nr); tmp *= nf; - do_div(tmp, od); + div64_ul(tmp, od); return tmp; }