From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Mon, 07 Dec 2009 21:09:34 +0100 Subject: [U-Boot] [PATCH] Fix debug output. In-Reply-To: <4B1CFEF3.7080302@corscience.de> References: <1260177679-18337-1-git-send-email-weber@corscience.de> <20091207120754.AE6EA3F6CC@gemini.denx.de> <4B1CFEF3.7080302@corscience.de> Message-ID: <20091207200934.2CDC03F6CC@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Thomas Weber, In message <4B1CFEF3.7080302@corscience.de> you wrote: > > > Which problem is this supposed to fix? ... > 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) Well, and exactly this is valuable information which should be included into the commit message. Indeed, neither __func__ nor __FUNCTION__ can be concatenated; for some reason gcc seems to consider these as strings, but not as string constants. Dunno why; probably there is a good reason for this, but it looks stupid to me. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Not one hundred percent efficient, of course ... but nothing ever is. -- Kirk, "Metamorphosis", stardate 3219.8