Commit 4f1296a5169c13b2c1f76c1446aaf361e8519050
1 parent
7bcd4dae62
Exists in
master
and in
7 other branches
[SERIAL]: Fix 32-bit warnings in sunzilog.c and sunsu.c
resource_size_t can be either a u64 or a u32, and we can't really know for sure, so when printing such a value out always use long-long printf formatting and cast the argument to that type. Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 2 changed files with 11 additions and 8 deletions Side-by-side Diff
drivers/serial/sunsu.c
... | ... | @@ -1198,10 +1198,11 @@ |
1198 | 1198 | if (up->port.type == PORT_UNKNOWN) |
1199 | 1199 | return -ENODEV; |
1200 | 1200 | |
1201 | - printk("%s: %s port at %lx, irq %u\n", | |
1201 | + printk("%s: %s port at %llx, irq %u\n", | |
1202 | 1202 | to_of_device(up->port.dev)->node->full_name, |
1203 | 1203 | (up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse", |
1204 | - up->port.mapbase, up->port.irq); | |
1204 | + (unsigned long long) up->port.mapbase, | |
1205 | + up->port.irq); | |
1205 | 1206 | |
1206 | 1207 | #ifdef CONFIG_SERIO |
1207 | 1208 | serio = &up->serio; |
drivers/serial/sunzilog.c
... | ... | @@ -1431,14 +1431,16 @@ |
1431 | 1431 | return err; |
1432 | 1432 | } |
1433 | 1433 | } else { |
1434 | - printk(KERN_INFO "%s: Keyboard at MMIO 0x%lx (irq = %d) " | |
1434 | + printk(KERN_INFO "%s: Keyboard at MMIO 0x%llx (irq = %d) " | |
1435 | 1435 | "is a %s\n", |
1436 | - op->dev.bus_id, up[0].port.mapbase, op->irqs[0], | |
1437 | - sunzilog_type (&up[0].port)); | |
1438 | - printk(KERN_INFO "%s: Mouse at MMIO 0x%lx (irq = %d) " | |
1436 | + op->dev.bus_id, | |
1437 | + (unsigned long long) up[0].port.mapbase, | |
1438 | + op->irqs[0], sunzilog_type(&up[0].port)); | |
1439 | + printk(KERN_INFO "%s: Mouse at MMIO 0x%llx (irq = %d) " | |
1439 | 1440 | "is a %s\n", |
1440 | - op->dev.bus_id, up[1].port.mapbase, op->irqs[0], | |
1441 | - sunzilog_type (&up[1].port)); | |
1441 | + op->dev.bus_id, | |
1442 | + (unsigned long long) up[1].port.mapbase, | |
1443 | + op->irqs[0], sunzilog_type(&up[1].port)); | |
1442 | 1444 | } |
1443 | 1445 | |
1444 | 1446 | dev_set_drvdata(&op->dev, &up[0]); |