linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-m68k@vger.kernel.org, linux-kernel@vger.kernel.org,
	Helge Deller <deller@gmx.de>
Subject: [patch 12/18] HP input: kill warnings due to suseconds_t differences
Date: Mon, 13 Oct 2008 21:58:58 +0200	[thread overview]
Message-ID: <20081013195919.407702332@mail.of.borg> (raw)
In-Reply-To: 20081013195846.674654386@mail.of.borg

[-- Attachment #1: m68k+parisc-hp_sdc_rtc-printf-format-warnings.diff --]
[-- Type: text/plain, Size: 2586 bytes --]

From: Geert Uytterhoeven <geert@linux-m68k.org>

Kill compiler warnings related to printf() formats in the input drivers for
various HP9000 machines, which are shared between PA-RISC (suseconds_t is int)
and m68k (suseconds_t is long). As both are 32-bit, it's safe to cast to int.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Helge Deller <deller@gmx.de>
---
 drivers/input/misc/hp_sdc_rtc.c |   10 +++++-----
 drivers/input/serio/hp_sdc.c    |    2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

--- a/drivers/input/misc/hp_sdc_rtc.c
+++ b/drivers/input/misc/hp_sdc_rtc.c
@@ -458,35 +458,35 @@ static int hp_sdc_rtc_proc_output (char 
 		p += sprintf(p, "i8042 rtc\t: READ FAILED!\n");
 	} else {
 		p += sprintf(p, "i8042 rtc\t: %ld.%02d seconds\n", 
-			     tv.tv_sec, tv.tv_usec/1000);
+			     tv.tv_sec, (int)tv.tv_usec/1000);
 	}
 
 	if (hp_sdc_rtc_read_fhs(&tv)) {
 		p += sprintf(p, "handshake\t: READ FAILED!\n");
 	} else {
         	p += sprintf(p, "handshake\t: %ld.%02d seconds\n", 
-			     tv.tv_sec, tv.tv_usec/1000);
+			     tv.tv_sec, (int)tv.tv_usec/1000);
 	}
 
 	if (hp_sdc_rtc_read_mt(&tv)) {
 		p += sprintf(p, "alarm\t\t: READ FAILED!\n");
 	} else {
 		p += sprintf(p, "alarm\t\t: %ld.%02d seconds\n", 
-			     tv.tv_sec, tv.tv_usec/1000);
+			     tv.tv_sec, (int)tv.tv_usec/1000);
 	}
 
 	if (hp_sdc_rtc_read_dt(&tv)) {
 		p += sprintf(p, "delay\t\t: READ FAILED!\n");
 	} else {
 		p += sprintf(p, "delay\t\t: %ld.%02d seconds\n", 
-			     tv.tv_sec, tv.tv_usec/1000);
+			     tv.tv_sec, (int)tv.tv_usec/1000);
 	}
 
 	if (hp_sdc_rtc_read_ct(&tv)) {
 		p += sprintf(p, "periodic\t: READ FAILED!\n");
 	} else {
 		p += sprintf(p, "periodic\t: %ld.%02d seconds\n", 
-			     tv.tv_sec, tv.tv_usec/1000);
+			     tv.tv_sec, (int)tv.tv_usec/1000);
 	}
 
         p += sprintf(p,
--- a/drivers/input/serio/hp_sdc.c
+++ b/drivers/input/serio/hp_sdc.c
@@ -323,7 +323,7 @@ static void hp_sdc_tasklet(unsigned long
 			 * it back to the application. and be less verbose.
 			 */
 			printk(KERN_WARNING PREFIX "read timeout (%ius)!\n",
-			       tv.tv_usec - hp_sdc.rtv.tv_usec);
+			       (int)(tv.tv_usec - hp_sdc.rtv.tv_usec));
 			curr->idx += hp_sdc.rqty;
 			hp_sdc.rqty = 0;
 			tmp = curr->seq[curr->actidx];

-- 
Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


  parent reply	other threads:[~2008-10-13 20:10 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-13 19:58 [patch 00/18] m68k patches for 2.6.28 Geert Uytterhoeven
2008-10-13 19:58 ` [patch 01/18] m68k: use bcd2bin/bin2bcd Geert Uytterhoeven
2008-10-13 19:58 ` [patch 02/18] m68k: Use new printk() extension %pS to print symbols Geert Uytterhoeven
2008-10-13 19:58 ` [patch 03/18] m68k: Put .bss at the end of the data section Geert Uytterhoeven
2008-10-13 19:58 ` [patch 04/18] m68k: Add NOTES to init data so its discarded at boot Geert Uytterhoeven
2008-10-13 19:58 ` [patch 05/18] m68k: Reverse platform MMU logic so Sun 3 is last Geert Uytterhoeven
2008-10-13 19:58 ` [patch 06/18] m68k: Disable Amiga serial console support if modular Geert Uytterhoeven
2008-10-13 21:08   ` Paul Bolle
2008-10-14  7:29     ` Geert Uytterhoeven
2008-10-14 17:20   ` Linus Torvalds
2008-10-14 19:22     ` Geert Uytterhoeven
2008-10-13 19:58 ` [patch 07/18] m68k: Modular Amiga keyboard needs key_maps Geert Uytterhoeven
2008-10-13 19:58 ` [patch 08/18] m68k: Remove unused atari_kbd_translate() Geert Uytterhoeven
2008-10-13 19:58 ` [patch 09/18] m68k: Define rtc_lock on Atari Geert Uytterhoeven
2008-10-13 19:58 ` [patch 10/18] m68k: Add missing dma_sync_single_range_for_{cpu,device}() Geert Uytterhoeven
2008-10-13 19:58 ` [patch 11/18] m68k: <asm/pci.h> needs <asm-generic/pci-dma-compat.h> Geert Uytterhoeven
2008-10-13 19:58 ` Geert Uytterhoeven [this message]
2008-10-13 19:58 ` [patch 13/18] m68k: Remove the broken Hades support Geert Uytterhoeven
2008-10-13 19:59 ` [patch 14/18] m68k: remove the dead PCI code Geert Uytterhoeven
2008-10-13 19:59 ` [patch 15/18] m68k: init_irq_proc depends on CONFIG_PROC_FS Geert Uytterhoeven
2008-10-13 19:59 ` [patch 16/18] m68k: Atari SCSI needs NVRAM Geert Uytterhoeven
2008-10-13 19:59 ` [patch 17/18] net/rfkill/rfkill-input.c needs <linux/sched.h> Geert Uytterhoeven
2008-10-13 20:45   ` Henrique de Moraes Holschuh
2008-10-13 23:09     ` Henrique de Moraes Holschuh
2008-10-14  7:23     ` Geert Uytterhoeven
2008-10-15  3:10       ` Henrique de Moraes Holschuh
2008-10-15  7:50         ` Geert Uytterhoeven
2008-10-15 13:12         ` Adrian Bunk
2008-10-13 19:59 ` [patch 18/18] arch/m68k/mm/kmap.c: introduce missing kfree Geert Uytterhoeven

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=20081013195919.407702332@mail.of.borg \
    --to=geert@linux-m68k.org \
    --cc=deller@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).