lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <03591933cc384d7e91ede82f0cdd76a8@AcuMS.aculab.com>
Date:   Fri, 21 Jan 2022 13:34:19 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Jiapeng Chong' <jiapeng.chong@...ux.alibaba.com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC:     "linux-staging@...ts.linux.dev" <linux-staging@...ts.linux.dev>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Abaci Robot <abaci@...ux.alibaba.com>
Subject: RE: [PATCH] staging: pi433: using div64_u64() instead of do_div()

From: Jiapeng Chong
> Sent: 21 January 2022 11:50
> Subject: [PATCH] staging: pi433: using div64_u64() instead of do_div()
> 
> Clean the following coccicheck warning:
> 
> ./drivers/staging/pi433/rf69.c:286:1-7: WARNING: do_div() does a
> 64-by-32 division, please consider using div64_u64 instead.

That is one of patchcheck's worse warnings.

You need to check the domain of the divisor, not its type.

do_div() exists to avoid expensive 64bit divides when the
divisor is small.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ