mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "debian developer" <debiandev@gmail.com>
To: kernelnewbies@nl.linux.org, LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org
Subject: Resend [Patch 1/1] Trivial - kernel/time/ntp.c: fix warning
Date: Sat, 3 May 2008 00:10:19 +0530	[thread overview]
Message-ID: <f24d23310805021140r5704cb70ubd3d11ff60344d67@mail.gmail.com> (raw)

Mailer spoilt the previous send... sorry for that
Hello,

On compiling on a Xeon machine i get the following warning

kernel/time/ntp.c: In function `do_adjtimex':
kernel/time/ntp.c:328: warning: comparison of distinct pointer types
lacks a cast
kernel/time/ntp.c:329: warning: comparison of distinct pointer types
lacks a cast

This is with gcc version 3.4.3. The following patch fixes this...

--- linux-2.6.25/kernel/time/ntp.c.orig 2008-05-03 04:27:20.000000000 +0530
+++ linux-2.6.25/kernel/time/ntp.c      2008-05-03 04:45:06.000000000 +0530
@@ -325,8 +325,8 @@ int do_adjtimex(struct timex *txc)
                    * Scale the phase adjustment and
                    * clamp to the operating range.
                    */
-                   time_offset = min(time_offset, (s64)MAXPHASE *
NSEC_PER_USEC);
-                   time_offset = max(time_offset, (s64)-MAXPHASE *
NSEC_PER_USEC);
+                   time_offset = min(time_offset, (s64)(MAXPHASE *
NSEC_PER_USEC));
+                   time_offset = max(time_offset, (s64)(-MAXPHASE *
NSEC_PER_USEC));

                   /*
                    * Select whether the frequency is to be controlled

                 reply	other threads:[~2008-05-02 18:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f24d23310805021140r5704cb70ubd3d11ff60344d67@mail.gmail.com \
    --to=debiandev@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kernelnewbies@nl.linux.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®