The patch titled
     ntp: make the kernel NTP code hand 64-bit *unsigned* values to do_div()
has been added to the -mm tree.  Its filename is
     ntp-make-the-kernel-ntp-code-hand-64-bit-unsigned-values-to-do_div.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: ntp: make the kernel NTP code hand 64-bit *unsigned* values to do_div()
From: David Howells <[EMAIL PROTECTED]>

The kernel NTP code shouldn't hand 64-bit *signed* values to do_div().  Make it
instead hand 64-bit unsigned values.  This gets rid of a couple of warnings.

Signed-off-by: David Howells <[EMAIL PROTECTED]>
Cc: Roman Zippel <[EMAIL PROTECTED]>
Cc: Thomas Gleixner <[EMAIL PROTECTED]>
Cc: Ingo Molnar <[EMAIL PROTECTED]>
Cc: john stultz <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 kernel/time/ntp.c |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff -puN 
kernel/time/ntp.c~ntp-make-the-kernel-ntp-code-hand-64-bit-unsigned-values-to-do_div
 kernel/time/ntp.c
--- 
a/kernel/time/ntp.c~ntp-make-the-kernel-ntp-code-hand-64-bit-unsigned-values-to-do_div
+++ a/kernel/time/ntp.c
@@ -342,14 +342,16 @@ int do_adjtimex(struct timex *txc)
                    freq_adj = shift_right(freq_adj, time_constant * 2 +
                                           (SHIFT_PLL + 2) * 2 - SHIFT_NSEC);
                    if (mtemp >= MINSEC && (time_status & STA_FLL || mtemp > 
MAXSEC)) {
+                       u64 utemp64;
                        temp64 = time_offset << (SHIFT_NSEC - SHIFT_FLL);
                        if (time_offset < 0) {
-                           temp64 = -temp64;
-                           do_div(temp64, mtemp);
-                           freq_adj -= temp64;
+                           utemp64 = -temp64;
+                           do_div(utemp64, mtemp);
+                           freq_adj -= utemp64;
                        } else {
-                           do_div(temp64, mtemp);
-                           freq_adj += temp64;
+                           utemp64 = temp64;
+                           do_div(utemp64, mtemp);
+                           freq_adj += utemp64;
                        }
                    }
                    freq_adj += time_freq;
_

Patches currently in -mm which might be from [EMAIL PROTECTED] are

mn10300-define-hz-as-a-config-option.patch
mn10300-define-so_mark.patch
nommu-is_vmalloc_addr-wont-compile-if-mmu.patch
iget-stop-unionfs-from-using-iget-and-read_inode.patch
ntp-make-the-kernel-ntp-code-hand-64-bit-unsigned-values-to-do_div.patch
keys-increase-the-payload-size-when-instantiating-a-key.patch
keys-check-starting-keyring-as-part-of-search.patch
keys-allow-the-callout-data-to-be-passed-as-a-blob-rather-than-a-string.patch
keys-add-keyctl-function-to-get-a-security-label.patch
procfs-task-exe-symlink.patch
procfs-task-exe-symlink-fix.patch
procfs-task-exe-symlink-fix-2.patch
mutex-subsystem-synchro-test-module.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to