mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [PATCH] fbdev: radeon: Remove 'struct timeval' usage
@ 2015-06-05  7:55 Tina Ruchandani
  2015-06-05 21:12 ` [Y2038] " Arnd Bergmann
  0 siblings, 1 reply; 2+ messages in thread
From: Tina Ruchandani @ 2015-06-05  7:55 UTC (permalink / raw)
  To: Dave Airlie
  Cc: Tomi Valkeinen, Arnd Bergmann, y2038, Benjamin Herrenschmidt,
	Jean-Christophe Plagniol-Villard, Linux Fbdev development list,
	LKML

>>> +     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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-05 21:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-05  7:55 [PATCH] fbdev: radeon: Remove 'struct timeval' usage Tina Ruchandani
2015-06-05 21:12 ` [Y2038] " Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®