Re: [PATCH] staging: pi433: Use div64_u64 instead of do_div

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

 



2022년 10월 19일 (수) 오후 7:31, David Laight <David.Laight@xxxxxxxxxx>님이 작성:
>
> From: Kang Minchul
> > Sent: 19 October 2022 10:40
> >
> > This commit removes warning generated by cocci as follows:
> >
> > do_div() does a 64-by-32 division, please consider using div64_u64 instead.
> >
> > Using div64_u64 instead of do_div can avoid potential truncation.
>
> Cocci is lying to you.
>
> do_div() exists because a 64 by 32 bit divide is significantly
> faster than a 64 by 64 divide.
> This is particularly true on 32bit cpu, but is also true on
> Intel x86_64 bit cpu.
I guess I have missed that point,
Thanks for your feedback!

Kang Minchul





[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