From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Weber Date: Mon, 07 Dec 2009 14:11:15 +0100 Subject: [U-Boot] [PATCH] Fix debug output. In-Reply-To: <20091207120754.AE6EA3F6CC@gemini.denx.de> References: <1260177679-18337-1-git-send-email-weber@corscience.de> <20091207120754.AE6EA3F6CC@gemini.denx.de> Message-ID: <4B1CFEF3.7080302@corscience.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk schrieb: > Dear Thomas Weber, > > In message <1260177679-18337-1-git-send-email-weber@corscience.de> you wrote: > >> Signed-off-by: Thomas Weber >> --- >> drivers/net/dm9000x.c | 4 ++-- >> 1 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c >> index 73dd335..08bd794 100644 >> --- a/drivers/net/dm9000x.c >> +++ b/drivers/net/dm9000x.c >> @@ -74,8 +74,8 @@ TODO: external MII is not functional, only internal at the moment. >> #define DM9000_DBG(fmt,args...) printf(fmt, ##args) >> #define DM9000_DMP_PACKET(func,packet,length) \ >> do { \ >> - int i; \ >> - printf(func ": length: %d\n", length); \ >> + int i; \ >> + printf("%s: length: %d\n",func, length); \ >> for (i = 0; i < length; i++) { \ >> if (i % 8 == 0) \ >> printf("\n%s: %02x: ", func, i); \ >> > > Which problem is this supposed to fix? > > Actually this patch introduces two new issues (the "int i;" line uses > spaces for indentation, and the '\' are not vertically aligned any > more). > > NAK. > > Best regards, > > Wolfgang Denk > > Hello, In commit 60f61e6d7655400bb785a2ef637581679941f6d1 the following calls where changed. - DM9000_DMP_PACKET("eth_send", packet, length); + DM9000_DMP_PACKET(__func__ , packet, length); - DM9000_DMP_PACKET("eth_rx", rdptr, RxLen); + DM9000_DMP_PACKET(__func__ , rdptr, RxLen); The identifier __func__ is used to call this macro. Formerly it was a string "eth_send" for the function name. printf("eth_send" ":length ...") worked, but printf(__func__ ":length ...") doesn't compile. (tested with gcc-4.4.1) Sorry, for space and it was the wrong tab space :( Best Regards. Thomas Weber -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 262 bytes Desc: OpenPGP digital signature Url : http://lists.denx.de/pipermail/u-boot/attachments/20091207/98f919f0/attachment.pgp