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-next>] [day] [month] [year] [list]
Message-ID: <CAB__kknUjU1vdERZQQCxD95idobKN6M-eQZP1jH77tTS3MxhGA@mail.gmail.com>
Date:	Fri, 5 Jun 2015 00:55:05 -0700
From:	Tina Ruchandani <ruchandani.tina@...il.com>
To:	Dave Airlie <airlied@...il.com>
Cc:	Tomi Valkeinen <tomi.valkeinen@...com>,
	Arnd Bergmann <arnd@...db.de>, y2038@...ts.linaro.org,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
	Linux Fbdev development list <linux-fbdev@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] fbdev: radeon: Remove 'struct timeval' usage

>>> +     hz = 1000000/delta;
>
> This needs to be on of the do_div family.
>
> Dave.

Hi Dave,
I build-tested the patch for both 32-bit and 64-bit x86. If my
understanding is correct, since the divisor is 64-bit here, the
compiler will do "if (delta > 1000000) hz = 0; else hz =
1000000/(s32)delta" automatically?
In general, is this a good thumb-rule to follow - use do_div if the
dividend is 64-bit, and normal divide operator if only the divisor is
64-bit?

Tina
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ