All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/6] errno: Allow errno_str() to be used without CONFIG_ERRNO_STR
Date: Sun,  8 May 2016 16:55:18 -0600	[thread overview]
Message-ID: <1462748122-30918-3-git-send-email-sjg@chromium.org> (raw)
In-Reply-To: <1462748122-30918-1-git-send-email-sjg@chromium.org>

The pmic framework uses errno_str() and this requires board that use it to
enable CONFIG_ERRNO_STR to avoid a build error. Update the header to provide
a NULL error message when CONFIG_ERRNO_STR is not defined, and fix the build
error.

This will show as "(null)" when U-Boot prints it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2:
- Add new patch to allow errno_str() to be used without CONFIG_ERRNO_STR

 include/errno.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/errno.h b/include/errno.h
index 3942681..15ece2f 100644
--- a/include/errno.h
+++ b/include/errno.h
@@ -15,5 +15,10 @@ extern int errno;
 
 #ifdef CONFIG_ERRNO_STR
 const char *errno_str(int errno);
+#else
+static inline const char *errno_str(int errno)
+{
+	return 0;
+}
 #endif
 #endif /* _ERRNO_H */
-- 
2.8.0.rc3.226.g39d4020

  parent reply	other threads:[~2016-05-08 22:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-08 22:55 [U-Boot] [PATCH v2 0/6] tegra: Move tegra20 towards the 'new' display bindings Simon Glass
2016-05-08 22:55 ` [U-Boot] [PATCH v2 1/6] errno: Add copyright header and header guard Simon Glass
2016-05-08 22:55 ` Simon Glass [this message]
2016-05-08 22:55 ` [U-Boot] [PATCH v2 3/6] tegra: dts: Sync tegra20 device tree files with Linux Simon Glass
2016-05-09 17:09   ` Stephen Warren
2016-05-09 19:26     ` Simon Glass
2016-05-10 17:45       ` Stephen Warren
2016-05-13  3:11         ` Simon Glass
2016-05-08 22:55 ` [U-Boot] [PATCH v2 4/6] video: tegra: Move to using simple-panel and pwm-backlight Simon Glass
2016-05-08 22:55 ` [U-Boot] [PATCH v2 5/6] tegra: video: Always use write-through cache on LCD Simon Glass
2016-05-08 22:55 ` [U-Boot] [PATCH v2 6/6] fdt: Drop some unused compatible strings Simon Glass
2016-05-09 16:53 ` [U-Boot] [PATCH v2 0/6] tegra: Move tegra20 towards the 'new' display bindings Stephen Warren

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=1462748122-30918-3-git-send-email-sjg@chromium.org \
    --to=sjg@chromium.org \
    --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.