Skip to contentSkip to conversation

serial_core: fix printk format warnings

PATCH In review Alexander Beregalov 2 participants 2 messages Sep 21, 2008 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 serial_core: fix printk format warnings

drivers/serial/serial_core.c:2158: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'long unsigned int' drivers/serial/serial_core.c:2162: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'long unsigned int

---

 drivers/serial/serial_core.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/serial/serial_core.c +2 -2
index effd0bd..d531ae9 100644
@@ -2155,11 +2155,11 @@ uart_report_port(struct uart_driver *drv, struct uart_port *port)
 	switch (port->iotype) {
 	case UPIO_PORT:
 		snprintf(address, sizeof(address),
-			 "I/O 0x%x", port->iobase);
+			 "I/O 0x%lx", port->iobase);
 		break;
 	case UPIO_HUB6:
 		snprintf(address, sizeof(address),
-			 "I/O 0x%x offset 0x%x", port->iobase, port->hub6);
+			 "I/O 0x%lx offset 0x%x", port->iobase, port->hub6);
 		break;
 	case UPIO_MEM:
 	case UPIO_MEM32:
#1 lore raw

From: Alexander Beregalov <[email protected]>
Date: Sun, 21 Sep 2008 05:11:31 +0400

Quoted 6 lines

drivers/serial/serial_core.c:2158: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'long unsigned int' drivers/serial/serial_core.c:2162: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'long unsigned int

This is because of a patch of mine that Andrew added to -mm, which changed the ioport to be an unsigned long.

I have some updates which I'll send to Andrew which should cure this.