RE: [PATCH] declance: Fix 64-bit compilation warnings
From: Maciej W. Rozycki <hidden>
Date: 2014-06-30 09:58:25
From: Maciej W. Rozycki <hidden>
Date: 2014-06-30 09:58:25
On Mon, 30 Jun 2014, David Laight wrote:
quoted
quoted
@@ -499,8 +499,9 @@ static void lance_init_ring(struct net_d /* The ones required by tmd2 */ *lib_ptr(ib, btx_ring[i].misc, lp->type) = 0; if (i < 3 && ZERO) - printk("%d: 0x%8.8x(0x%8.8x)\n", - i, leptr, (uint)lp->tx_buf_ptr_cpu[i]); + printk("%d: 0x%8.8x(%#0*lx)\n", + i, leptr, (int)sizeof(long), + (long)lp->tx_buf_ptr_cpu[i]);You need to adjust the "*" and sizeof(long) with +2 for the 0x prefix in the output length here.Do you need all the leading zeros at all?
For output alignment; plus the change is not intended to change semantics, but just to address the lack of 64-bit cleanliness. Maciej