Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=90b2628f1fe94a667330d425a7fb76ec8d2a49ec
Commit:     90b2628f1fe94a667330d425a7fb76ec8d2a49ec
Parent:     e697789d64f8748cb219d7f5c413c512953802cc
Author:     Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Sun Dec 30 17:24:35 2007 +0100
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Sun Dec 30 17:24:35 2007 +0100

    sched: fix gcc warnings
    
    Meelis Roos reported these warnings on sparc64:
    
      CC      kernel/sched.o
      In file included from kernel/sched.c:879:
      kernel/sched_debug.c: In function 'nsec_high':
      kernel/sched_debug.c:38: warning: comparison of distinct pointer types 
lacks a cast
    
    the debug check in do_div() is over-eager here, because the long long
    is always positive in these places. Mark this by casting them to
    unsigned long long.
    
    no change in code output:
    
       text    data     bss     dec     hex filename
      51471    6582     376   58429    e43d sched.o.before
      51471    6582     376   58429    e43d sched.o.after
    
      md5:
       7f7729c111f185bf3ccea4d542abc049  sched.o.before.asm
       7f7729c111f185bf3ccea4d542abc049  sched.o.after.asm
    
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 kernel/sched_debug.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index d30467b..80fbbfc 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -31,9 +31,9 @@
 /*
  * Ease the printing of nsec fields:
  */
-static long long nsec_high(long long nsec)
+static long long nsec_high(unsigned long long nsec)
 {
-       if (nsec < 0) {
+       if ((long long)nsec < 0) {
                nsec = -nsec;
                do_div(nsec, 1000000);
                return -nsec;
@@ -43,9 +43,9 @@ static long long nsec_high(long long nsec)
        return nsec;
 }
 
-static unsigned long nsec_low(long long nsec)
+static unsigned long nsec_low(unsigned long long nsec)
 {
-       if (nsec < 0)
+       if ((long long)nsec < 0)
                nsec = -nsec;
 
        return do_div(nsec, 1000000);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to