From mboxrd@z Thu Jan 1 00:00:00 1970 From: Graeme Russ Date: Fri, 23 Jan 2015 14:23:12 +1100 Subject: [U-Boot] Using __func__ and __LINE__ in debug outputs Message-ID: <54C1BEA0.6070204@tss-engineering.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi All, What is the general consensus on using __func__ and __LINE__ in debug outputs? My personal opinion is that distinct statements that can be grep'd are better for a couple of reasons: - It keeps the debug statements shorter - If your running a slightly older version of U-Boot, the line numbers (and possibly even the function names) may not match the current version of the source code Regardless of whether we should use __func__ and __LINE__, greping for __func__ yields 1,837 hits with inconsistent usage. Should we not simply have a #define which tells debug() to output the function and line number in a consistent manner? Regards, Graeme