[U-Boot] Using __func__ and __LINE__ in debug outputs
Graeme Russ
gruss at tss-engineering.com
Fri Jan 23 04:23:12 CET 2015
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
More information about the U-Boot
mailing list