[Compile Regression in 2.4.25-pre8][PATCH 40/42]

Kronos
2004-02-02T20:08:53Z

sundance.c:1678: warning: unsigned int format, different type arg (arg 3)
sundance.c:994: warning: unsigned int format, different type arg (arg 3)

dma_addr_t can be 64 bit long even on x86 (when CONFIG_HIGHMEM64G is
defined). Cast to dma64_addr_t in the printk.

diff -Nru -X dontdiff linux-2.4-vanilla/drivers/net/sundance.c linux-2.4/drivers/net/sundance.c
--- linux-2.4-vanilla/drivers/net/sundance.c Tue Nov 11 17:51:13 2003
+++ linux-2.4/drivers/net/sundance.c Sat Jan 31 19:13:53 2004
@@ -985,8 +985,8 @@
{
int i;
for (i=0; i<TX_RING_SIZE; i++) {
- printk(KERN_DEBUG "%02x %08x %08x %08x(%02x) %08x %08x\n", i,
- np->tx_ring_dma + i*sizeof(*np->tx_ring),
+ printk(KERN_DEBUG "%02x %08Lx %08x %08x(%02x) %08x %08x\n", i,
+ (dma64_addr_t)np->tx_ring_dma + i*sizeof(*np->tx_ring),
le32_to_cpu(np->tx_ring[i].next_desc),
le32_to_cpu(np->tx_ring[i].status),
(le32_to_cpu(np->tx_ring[i].status) >> 2) & 0xff,
@@ -1668,8 +1668,8 @@
switch (cmd) {
case SIOCDEVPRIVATE:
for (i=0; i<TX_RING_SIZE; i++) {
- printk(KERN_DEBUG "%02x %08x %08x %08x(%02x) %08x %08x\n", i,
- np->tx_ring_dma + i*sizeof(*np->tx_ring),
+ printk(KERN_DEBUG "%02x %08Lx %08x %08x(%02x) %08x %08x\n", i,
+ (dma64_addr_t)np->tx_ring_dma + i*sizeof(*np->tx_ring),
le32_to_cpu(np->tx_ring[i].next_desc),
le32_to_cpu(np->tx_ring[i].status),
(le32_to_cpu(np->tx_ring[i].status) >> 2)

--
Reply-To: kronos@kronoz.cjb.net
Home: http://kronoz.cjb.net
K.R.O.N.O.S
Kinetic Replicant Optimized for Nocturnal Observation and Sabotage