From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laxman Dewangan Subject: Re: [PATCH] pwm: tegra: Avoid potential overflow for short periods Date: Thu, 13 Apr 2017 16:46:44 +0530 Message-ID: <58EF5E1C.6020107@nvidia.com> References: <20170412163320.11760-1-thierry.reding@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20170412163320.11760-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Thierry Reding Cc: Jon Hunter , linux-pwm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-tegra@vger.kernel.org On Wednesday 12 April 2017 10:03 PM, Thierry Reding wrote: > For very short periods, the result of the division might overflow the > unsigned long hz variable (on 32-bit architectures). Avoid that by > making it an unsigned long long. While at it, also remove an unneeded > local variable whose only purpose is to store a temporary computation. > > Signed-off-by: Thierry Reding > --- Acked-by: Laxman Dewangan