From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] Create configuration option for restricted ns16550 functions
Date: Wed, 18 Feb 2009 13:54:17 -0600 [thread overview]
Message-ID: <499C6769.5080703@freescale.com> (raw)
In-Reply-To: <20090218140159.e4880db0.kim.phillips@freescale.com>
Kim Phillips wrote:
> diff --git a/include/ns16550.h b/include/ns16550.h
> index e6ade61..dbaacfc 100644
> --- a/include/ns16550.h
> +++ b/include/ns16550.h
> @@ -154,6 +154,12 @@ typedef volatile struct NS16550 *NS16550_t;
>
> void NS16550_init (NS16550_t com_port, int baud_divisor);
> void NS16550_putc (NS16550_t com_port, char c);
> +#ifndef CONFIG_SYS_NS16550_MIN_FUNCTIONS
> char NS16550_getc (NS16550_t com_port);
> int NS16550_tstc (NS16550_t com_port);
> void NS16550_reinit (NS16550_t com_port, int baud_divisor);
> +#else
> +#define NS16550_getc(com_port) 0
> +#define NS16550_tstc(com_port) 0
> +#define NS16550_reinit(com_port, baud_divisor)
> +#endif
I think it would be better to get the error than to silently nop these
functions out. The point is to eliminate them when they're not used at
all, such as in the AND bootstrap.
Plus, the above definitions could cause unused variable warnings if
nothing else consumes the arguments to the macros.
-Scott
next prev parent reply other threads:[~2009-02-18 19:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-17 20:14 [U-Boot] [PATCH v2] Create configuration option for restricted ns16550 functions Ron Madrid
2009-02-18 18:21 ` Kim Phillips
2009-02-18 18:12 ` Scott Wood
2009-02-18 18:29 ` Wolfgang Denk
2009-02-18 20:01 ` Kim Phillips
2009-02-18 19:54 ` Scott Wood [this message]
2009-02-18 20:02 ` Ron Madrid
2009-02-18 20:45 ` Kim Phillips
2009-02-18 22:11 ` Wolfgang Denk
2009-02-18 23:23 ` Kim Phillips
2009-02-18 23:36 ` Wolfgang Denk
2009-02-18 18:30 ` Kim Phillips
2009-02-18 19:02 ` Ron Madrid
2009-02-18 21:58 ` Wolfgang Denk
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=499C6769.5080703@freescale.com \
--to=scottwood@freescale.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox