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 X-Spam-Level: X-Spam-Status: No, score=-4.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BEC48C07E99 for ; Fri, 9 Jul 2021 05:55:24 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 7B28661442 for ; Fri, 9 Jul 2021 05:55:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B28661442 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: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-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=upEO6hrPCMPYiMOOoAvn7K+SScEuXmfPrdCWZRE9gdQ=; b=kwNF20oxyFGLDfTIgCCORQdSee 6Zktp67xFLjzCAcXwyINfaTumEa7NqI5bAu5S2RVkjN2ZnsLdM4y+1vPf5mlgLGJVDqlQEA+PBxyg JlchqL+Z8vna11AXvWHI+Qfvgmk2IBaJzy5JoKyjNc9vxaEFufShkjT9hoJIGX9RVfFVsOIj0IIJo T3P6NfmqzF2tP9Che0Y9Nj6gvp4tHI/OBW5h73m+BEFb21wSPi21/HuOO1oMwbij+KzV7d0RJPMEq r1ETAtEMeH/yuC8Mo1LBxSbNSQ5xk5foGMnLG5NNBxGW6H5uHcGJjU4yVjviPFoeR1thGORj6iJgJ IfY5qx7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m1jSS-000pvz-3q; Fri, 09 Jul 2021 05:53:52 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m1jSO-000pve-Gp for linux-arm-kernel@lists.infradead.org; Fri, 09 Jul 2021 05:53:50 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1jSI-0007lA-QR; Fri, 09 Jul 2021 07:53:42 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1m1jSE-0003cR-5b; Fri, 09 Jul 2021 07:53:38 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1m1jSE-0000zp-38; Fri, 09 Jul 2021 07:53:38 +0200 Date: Fri, 9 Jul 2021 07:53:25 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Billy Tsai Cc: "lee.jones@linaro.org" , "robh+dt@kernel.org" , "joel@jms.id.au" , "andrew@aj.id.au" , "thierry.reding@gmail.com" , "p.zabel@pengutronix.de" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-aspeed@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" , "linux-pwm@vger.kernel.org" , BMC-SW Subject: Re: [v8 2/2] pwm: Add Aspeed ast2600 PWM support Message-ID: <20210709055325.4y4ufjvoiwo2pcvi@pengutronix.de> References: <20210608064658.14262-1-billy_tsai@aspeedtech.com> <20210608064658.14262-3-billy_tsai@aspeedtech.com> <20210702143147.6a7psfup4tlidq2x@pengutronix.de> MIME-Version: 1.0 In-Reply-To: X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210708_225348_605821_972F0E1B X-CRM114-Status: GOOD ( 14.48 ) X-BeenThere: linux-arm-kernel@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: multipart/mixed; boundary="===============0440363015651035363==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============0440363015651035363== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qqbiwvrhqx7yu7h3" Content-Disposition: inline --qqbiwvrhqx7yu7h3 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Billy, On Fri, Jul 09, 2021 at 05:40:45AM +0000, Billy Tsai wrote: > On 2021/7/2, 10:32 PM, "Uwe Kleine-K=F6nig" wrote: > > The multiplication can be up to: >=20 > > 100000000 * (1 << 31) * (31 + 1) * (255 + 1) >=20 > > right? This needs 71 bits and so might overflow a u64. >=20 > No, the multiplication can be up to: >=20 > Max(div_h) =3D 15 > Max(div_l) =3D 255 > Max(clk_period) =3D 255 > 1000000000 * (1 << 15) * (255 + 1) * (255 + 1) < 2^64 - 1 > it doesn't overflow a u64. Ah, you're right. Please note this in a comment (not that you were right, but that it doesn't overflow :-) Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --qqbiwvrhqx7yu7h3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmDn5FAACgkQwfwUeK3K 7AkCLgf/Wqw5mfuphqGF4+uRZjb+BVpbgi6TY8lgmZQS9hR+16ML35aNawrAo0J/ c/2e0I8SQtbevb552QGX2eSStU0i/jPIWBpXRzYBxYNy4+tYOdpL59GEA5qZJeH7 R83lXsYsQEOGoSufHH3MsHWZfPXNms1rxZAmQ1Zlp6AqRVwVNE+cLdC3ByC9qxxl Um2TbbOwVHvQfhXgfGLwlC1rmBeDU0I0rrdWNBnw3ifWKCCHuwytg/mJ0c/MXKzo 44gxD+YqV0J1gy9vKLtNWEOFY8RBXV5UjPQLgH2bk5vD9xLOATF11c5wc2e58s6P aCwg6rvWFB+hrS+UP6aXQlO4CKM5uQ== =i2jo -----END PGP SIGNATURE----- --qqbiwvrhqx7yu7h3-- --===============0440363015651035363== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============0440363015651035363==--