All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodolfo Giometti <giometti@linux.it>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>,
	linux-kernel@vger.kernel.org,
	Rodolfo Giometti <giometti@linux.it>
Subject: [PATCH] pps ldisc: avoid noisy compilation on 64bits architecture.
Date: Tue,  2 Dec 2008 11:56:07 +0100	[thread overview]
Message-ID: <1228215367-22479-2-git-send-email-giometti@linux.it> (raw)
In-Reply-To: <1228215367-22479-1-git-send-email-giometti@linux.it>

Fix things like these:

drivers/pps/clients/pps-ldisc.c: In function 'pps_tty_dcd_change':
drivers/pps/clients/pps-ldisc.c:32: warning: cast from pointer to integer of different size

Signed-off-by: Rodolfo Giometti <giometti@linux.it>
---
 drivers/pps/clients/pps-ldisc.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/pps/clients/pps-ldisc.c b/drivers/pps/clients/pps-ldisc.c
index 234867b..f16396b 100644
--- a/drivers/pps/clients/pps-ldisc.c
+++ b/drivers/pps/clients/pps-ldisc.c
@@ -29,7 +29,7 @@
 static void pps_tty_dcd_change(struct tty_struct *tty, unsigned int status,
 				struct timespec *ts)
 {
-	int id = (int) tty->disc_data;
+	long id = (long) tty->disc_data;
 	struct timespec __ts;
 	struct pps_ktime pps_ts;
 
@@ -50,7 +50,7 @@ static void pps_tty_dcd_change(struct tty_struct *tty, unsigned int status,
 			NULL);
 
 	pr_debug("PPS %s at %lu on source #%d\n",
-			status ? "assert" : "clear", jiffies, id);
+			status ? "assert" : "clear", jiffies, (int) id);
 }
 
 static int pps_tty_open(struct tty_struct *tty)
@@ -58,7 +58,7 @@ static int pps_tty_open(struct tty_struct *tty)
 	struct pps_source_info info;
 	struct tty_driver *drv = tty->driver;
 	int index = tty->index + drv->name_base;
-	int ret;
+	long ret;
 
 	info.owner = THIS_MODULE;
 	info.dev = NULL;
@@ -79,21 +79,21 @@ static int pps_tty_open(struct tty_struct *tty)
 	/* Should open N_TTY ldisc too */
 	ret = n_tty_open(tty);
 	if (ret < 0)
-		pps_unregister_source((int) tty->disc_data);
+		pps_unregister_source((long) tty->disc_data);
 
-	pr_info("PPS source #%d \"%s\" added\n", ret, info.path);
+	pr_info("PPS source #%d \"%s\" added\n", (int) ret, info.path);
 
 	return 0;
 }
 
 static void pps_tty_close(struct tty_struct *tty)
 {
-	int id = (int) tty->disc_data;
+	long id = (long) tty->disc_data;
 
 	pps_unregister_source(id);
 	n_tty_close(tty);
 
-	pr_info("PPS source #%d removed\n", id);
+	pr_info("PPS source #%d removed\n", (int) id);
 }
 
 struct tty_ldisc_ops pps_ldisc_ops = {
-- 
1.5.3.8


      reply	other threads:[~2008-12-02 10:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-27  1:01 mmotm 2008-11-26-17-00 uploaded akpm
2008-11-28 13:09 ` Tetsuo Handa
2008-11-28 19:42   ` Andrew Morton
2008-12-03 15:52     ` Stephen Hemminger
2008-12-03 21:42       ` Tetsuo Handa
2008-11-29  4:57 ` mmotm 2008-11-26-17-00 uploaded (backlight) Randy Dunlap
2008-11-29  5:01 ` mmotm 2008-11-26-17-00 uploaded (hwmon / dev_attr_name) Randy Dunlap
2008-11-29  6:06   ` Andrew Morton
2008-11-29 17:25     ` Randy Dunlap
2008-12-01  5:53       ` Andrew Morton
2008-12-01 13:56         ` Rodolfo Giometti
2008-12-01 18:37           ` Andrew Morton
2008-12-02 10:13             ` Rodolfo Giometti
2008-12-02 10:56             ` [PATCH] pps sysfs: not needed variables removed Rodolfo Giometti
2008-12-02 10:56               ` Rodolfo Giometti [this message]

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=1228215367-22479-2-git-send-email-giometti@linux.it \
    --to=giometti@linux.it \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.