[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <SJ0PR03MB6778453D256C9971B950956A99329@SJ0PR03MB6778.namprd03.prod.outlook.com>
Date: Fri, 28 Oct 2022 10:11:41 +0000
From: "Sa, Nuno" <Nuno.Sa@...log.com>
To: Deepak R Varma <drv@...lo.com>,
Lars-Peter Clausen <lars@...afoo.de>,
"Hennerich, Michael" <Michael.Hennerich@...log.com>,
Jonathan Cameron <jic23@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
"linux-staging@...ts.linux.dev" <linux-staging@...ts.linux.dev>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] staging: iio: frequency: ad9834: Use div64_ul instead of
do_div
> -----Original Message-----
> From: Deepak R Varma <drv@...lo.com>
> Sent: Thursday, October 27, 2022 11:48 PM
> To: Lars-Peter Clausen <lars@...afoo.de>; Hennerich, Michael
> <Michael.Hennerich@...log.com>; Jonathan Cameron <jic23@...nel.org>;
> Greg Kroah-Hartman <gregkh@...uxfoundation.org>; linux-
> iio@...r.kernel.org; linux-staging@...ts.linux.dev; linux-
> kernel@...r.kernel.org
> Subject: [PATCH] staging: iio: frequency: ad9834: Use div64_ul instead of
> do_div
>
> [External]
>
> do_div() does a 64-by-32 division. Here the divisor is an unsigned long
> which on some platforms is 64 bit wide. So use div64_ul instead of do_div
> to avoid a possible truncation. Issue identified using the
> coccicheck tool.
>
> Signed-off-by: Deepak R Varma <drv@...lo.com>
> ---
Reviewed-by: Nuno Sá <nuno.sa@...log.com>
Powered by blists - more mailing lists