All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] common/console.c: Fix unused warning with console_doenv()
@ 2019-10-30 13:18 Tom Rini
  2019-11-07 17:31 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rini @ 2019-10-30 13:18 UTC (permalink / raw)
  To: u-boot

Newer versions of LLVM-7 will provide an unused function warning over
console_doenv() in the case of SYS_CONSOLE_IS_IN_ENV not being enabled
as can be the case in SPL.  Add guards around this function.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 common/console.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/common/console.c b/common/console.c
index 89b1e9590cad..168ba60d0d9e 100644
--- a/common/console.c
+++ b/common/console.c
@@ -252,10 +252,12 @@ static void console_puts(int file, const char *s)
 	}
 }
 
+#if CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV)
 static inline void console_doenv(int file, struct stdio_dev *dev)
 {
 	iomux_doenv(file, dev->name);
 }
+#endif
 #else
 static inline int console_getc(int file)
 {
@@ -283,10 +285,12 @@ static inline void console_puts(int file, const char *s)
 	stdio_devices[file]->puts(stdio_devices[file], s);
 }
 
+#if CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV)
 static inline void console_doenv(int file, struct stdio_dev *dev)
 {
 	console_setfile(file, dev);
 }
+#endif
 #endif /* CONIFIG_IS_ENABLED(CONSOLE_MUX) */
 
 /** U-Boot INITIAL CONSOLE-NOT COMPATIBLE FUNCTIONS *************************/
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] common/console.c: Fix unused warning with console_doenv()
  2019-10-30 13:18 [U-Boot] [PATCH] common/console.c: Fix unused warning with console_doenv() Tom Rini
@ 2019-11-07 17:31 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2019-11-07 17:31 UTC (permalink / raw)
  To: u-boot

On Wed, Oct 30, 2019 at 09:18:43AM -0400, Tom Rini wrote:

> Newer versions of LLVM-7 will provide an unused function warning over
> console_doenv() in the case of SYS_CONSOLE_IS_IN_ENV not being enabled
> as can be the case in SPL.  Add guards around this function.
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191107/40bb22c6/attachment.sig>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-07 17:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-30 13:18 [U-Boot] [PATCH] common/console.c: Fix unused warning with console_doenv() Tom Rini
2019-11-07 17:31 ` Tom Rini

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.