From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Warren Date: Wed, 22 Jul 2009 23:27:14 -0700 Subject: [U-Boot] minor debug cleanups in ./net In-Reply-To: <200907221856.46498.rgetz@blackfin.uclinux.org> References: <200907221856.46498.rgetz@blackfin.uclinux.org> Message-ID: <4A6802C2.1030701@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Robin, This won't apply: bwarren at bwarren-bldsrv:~/src/u-boot-net$ git am -s --whitespace=strip ~/h_drive/patches/minor\ debug\ cleanups\ in\ ._net.eml Applying minor debug cleanups in ./net fatal: patch fragment without header at line 198: @@ -879,13 +856,13 @@ DhcpHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len) Patch failed at 0001. When you have resolved this problem run "git-am --resolved". If you would prefer to skip this patch, instead run "git-am --skip". More issues below: Robin Getz wrote: > From: Robin Getz > > Minor ./net cleanups - no functional changes > - change #ifdef DEBUG printf(); #endif to just debug() > - changed __FUNCTION__ to __func__ > - got rid of extra whitespace between function and opening brace > - removed unnecessary braces on if statements > > gcc dead code elimination should make this functionally/size equivalent > when DEBUG is not defined. (confirmed on Blackfin, with gcc 4.3.3). > > Signed-off-by: Robin Getz > > --- > > > /* matched waiting packet's address */ > if (tmp == NetArpWaitReplyIP) { > -#ifdef ET_DEBUG > - puts ("Got it\n"); > + debug("Got it\n"); > #endif > I'm guessing you want to remove this #endif too, right? > /* save address for later use */ > memcpy(NetArpWaitPacketMAC, &arp->ar_data[0], 6); > @@ -1317,16 +1295,14 @@ NetReceive(volatile uchar * inpkt, int len) > } > return; > default: > -#ifdef ET_DEBUG > - printf("Unexpected ARP opcode 0x%x\n", ntohs(arp->ar_op)); > + debug("Unexpected ARP opcode 0x%x\n", ntohs(arp->ar_op)); > #endif > ditto > return; > } > break; > > case PROT_RARP: > -#ifdef ET_DEBUG > - puts ("Got RARP\n"); > + debug("Got RARP\n"); > #endif > And again... This is good stuff. Please clean it up and re-submit. regards, Ben