All of lore.kernel.org
 help / color / mirror / Atom feed
From: Graeme Russ <gruss@tss-engineering.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Using __func__ and __LINE__ in debug outputs
Date: Fri, 23 Jan 2015 14:23:12 +1100	[thread overview]
Message-ID: <54C1BEA0.6070204@tss-engineering.com> (raw)

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

                 reply	other threads:[~2015-01-23  3:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54C1BEA0.6070204@tss-engineering.com \
    --to=gruss@tss-engineering.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.