Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp3017846ybh; Sat, 25 Jul 2020 08:25:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLIsxvKMzwAsH8uuz07D5FLaiJf0RrTejtR03ow76XdlD7KHDGppGKZlnTaRsKm2zY6wu2 X-Received: by 2002:a05:6402:143c:: with SMTP id c28mr14293962edx.54.1595690719474; Sat, 25 Jul 2020 08:25:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595690719; cv=none; d=google.com; s=arc-20160816; b=mgm/oEJBfmpnAj2zqgYO4WzMhBkNN1jMRBjMY0iZwjIaFmcgBaYvhOorL/KhrQ8vW4 dGhWrPwpW6rYtSUDCaNR2cKta9bNRMN8zYekjzwi4dpLKhmXzq7ijLSuk3KHf0OOEHPR Ya1hpgy4GjL5hpU1CvY6nFPwgiECyKWPQ7PNR5Dmvg7tYNJEniVtSmJlk8sjO248ZIQ5 4wTkuXB4V4pG6iAYPwzr912ej0eUUOv7BsTL/UiTt8uoFKG6oR9yWhZBZw1VIbgn2E7G J4RjKVw9WJqX9n2bQc6baMLUq6Jhxb2/rLvYLhpEWdIDNLGlESivwBHPowj3hX3iOngG 7qqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=nJq4Xuu2/uFNSXxWi0hp1raklfgxBrX2kyGIPFG6Nlw=; b=eeXIKr/yIvsTEOtUqTFMMiLSm9RtHy0PTaax0hZoEuxn78Tai8hxITjAxeqwGAgnAr o9Rdhyy5rZIwImjTYmlnGtT0lc3Sf/DQHNR3cFb18ZiRt0RW9QrS9Jo4+vW3VZ3Sn+J9 4WH7HTXcyS8au0tWN0+Evlz8/keWwlNovBbunVI1gun1YOlRZzNH04zlznHjhdLFUnu8 ID/5KnYlTNtiT4YGbsWHe66dz1BMC5tXXZCkw3pMSazQ1TAPq/4m0eyvqwbHMmz4xKdI f7qYJtcQhGBYkNgrraw8i3KJHiPuoPFaQZSrDQNzSa4L5j8ayAyl6ZwkpEzhYJW3Uahj FjbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z3si2528096ejx.477.2020.07.25.08.24.56; Sat, 25 Jul 2020 08:25:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727014AbgGYPYq (ORCPT + 99 others); Sat, 25 Jul 2020 11:24:46 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:47896 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726567AbgGYPYq (ORCPT ); Sat, 25 Jul 2020 11:24:46 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 4F5B11C0BD2; Sat, 25 Jul 2020 17:24:43 +0200 (CEST) Date: Sat, 25 Jul 2020 17:24:42 +0200 From: Pavel Machek To: Martin Botka Cc: Fenglin Wu , Konrad Dybcio , Jacek Anaszewski , Dan Murphy , Rob Herring , Thierry Reding , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Lee Jones , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org Subject: Re: [PATCH RFC 2/6] pwm: core: Add option to config PWM duty/period with u64 data length Message-ID: <20200725152442.GA11424@duo.ucw.cz> References: <20200724213659.273599-1-martin.botka1@gmail.com> <20200724213659.273599-3-martin.botka1@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > As can be seen this divides llu by llu in few warnings and error. > At the time of sending i didn't realize it but this fails on 32 bit > architectures. >=20 > So i would like to ask how would you like this fixed ? > Using macro or some other way ? +#include - gain_q23 =3D (gain_q23 * dmic->boost_gain) / 100; + gain_q23 =3D div_u64(gain_q23 * dmic->boost_gain, 100); Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --k+w/mQv8wyuph6w0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCXxxOugAKCRAw5/Bqldv6 8i+SAJsEPcpEXMXcXh7cBUWfS4Ko7dvrYQCgr4NcRn/9JcdCCshgcyzI18+MxHg= =QIaD -----END PGP SIGNATURE----- --k+w/mQv8wyuph6w0--