From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Maciej W. Rozycki" Subject: Re: [PATCH] declance: Fix 64-bit compilation warnings Date: Sun, 29 Jun 2014 02:30:56 +0100 (BST) Message-ID: References: <1403996818.9064.48.camel@joe-AO725> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: netdev@vger.kernel.org To: Joe Perches Return-path: Received: from eddie.linux-mips.org ([78.24.191.182]:34175 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751579AbaF2Ba6 (ORCPT ); Sat, 28 Jun 2014 21:30:58 -0400 Received: from localhost.localdomain ([127.0.0.1]:50866 "EHLO localhost.localdomain" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S6822067AbaF2Ba4IFUI6 (ORCPT ); Sun, 29 Jun 2014 03:30:56 +0200 In-Reply-To: <1403996818.9064.48.camel@joe-AO725> Sender: netdev-owner@vger.kernel.org List-ID: On Sat, 28 Jun 2014, Joe Perches wrote: > > @@ -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. Good catch, thanks! MIPS kernel addresses always have their MSB set so this is hard to notice in testing. But also the width has to be doubled first, to take two digits per byte into account too. Sending an updated change right away, as soon as it builds and boots. Maciej