From: david@gibson.dropbear.id.au (David Gibson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC 1/5] dtc: Add helpers for various message levels
Date: Sun, 9 Mar 2014 22:43:19 +1100 [thread overview]
Message-ID: <20140309114319.GF20356@voom.redhat.com> (raw)
In-Reply-To: <1392919611-10746-2-git-send-email-t.figa@samsung.com>
On Thu, Feb 20, 2014 at 07:06:47PM +0100, Tomasz Figa wrote:
> This patch adds three helper macros to print errors, warnings and
> informational messages using standard format.
>
> Signed-off-by: Tomasz Figa <t.figa@samsung.com>
> ---
> dtc.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/dtc.h b/dtc.h
> index 20de073..e95bed7 100644
> --- a/dtc.h
> +++ b/dtc.h
> @@ -43,6 +43,9 @@
> #define debug(fmt,args...)
> #endif
>
> +#define pr_err(...) fprintf (stderr, "ERROR: " __VA_ARGS__)
> +#define pr_warn(...) fprintf (stderr, "WARNING: " __VA_ARGS__)
> +#define pr_info(...) fprintf (stderr, "INFO: " __VA_ARGS__)
So, there are already several message helper functions in dtc.
They're not all that consistently applied, so I can see an argument
for cleaning things up, and replacing them with ones modelled on the
kernel versions like these.
But.. this patch doesn't do that, it just adds yet another variant to
the mix.
In addition, what we want for messages in dtc is a bit different from
the kernel - the kernel's expexted to keep running, and the messages
log events of interest. For dtc, for each warning/error you should
also be deciding whether that should terminate the program or not -
these helpers don't address that.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140309/40f9c367/attachment-0001.sig>
next prev parent reply other threads:[~2014-03-09 11:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-20 18:06 [PATCH RFC 0/5] Hybrid approach for DT schema checking Tomasz Figa
2014-02-20 18:06 ` [PATCH RFC 1/5] dtc: Add helpers for various message levels Tomasz Figa
2014-03-09 11:43 ` David Gibson [this message]
2014-02-20 18:06 ` [PATCH RFC 2/5] dtc: livetree: Add more tree parsing helpers Tomasz Figa
2014-03-09 12:03 ` David Gibson
2014-02-20 18:06 ` [PATCH RFC 3/5] Implement DT schema checker using hybrid approach Tomasz Figa
2014-03-09 12:17 ` David Gibson
2014-02-20 18:06 ` [PATCH RFC 4/5] Add sample C-based generic bindings Tomasz Figa
2014-02-20 18:06 ` [PATCH RFC 5/5] Add sample DTS and DTSS schema Tomasz Figa
2014-03-09 12:22 ` [PATCH RFC 0/5] Hybrid approach for DT schema checking David Gibson
2014-05-13 13:21 ` Tomasz Figa
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=20140309114319.GF20356@voom.redhat.com \
--to=david@gibson.dropbear.id.au \
--cc=linux-arm-kernel@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).