RE: [PATCH] staging: iio: frequency: ad9832: Use div64_ul instead of do_div

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Deepak R Varma <drv@xxxxxxxxx>
> Sent: Thursday, October 27, 2022 11:54 PM
> To: outreachy@xxxxxxxxxxxxxxx; Lars-Peter Clausen <lars@xxxxxxxxxx>;
> Hennerich, Michael <Michael.Hennerich@xxxxxxxxxx>; Jonathan Cameron
> <jic23@xxxxxxxxxx>; Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>;
> linux-iio@xxxxxxxxxxxxxxx; linux-staging@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx
> Subject: [PATCH] staging: iio: frequency: ad9832: 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@xxxxxxxxx>
> ---

Reviewed-by: Nuno Sá <nuno.sa@xxxxxxxxxx>





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux