diff mbox

[24/25] sparse: fix declaration of fdt_strerror

Message ID 1424776479-13958-25-git-send-email-clg@fr.ibm.com
State Accepted
Headers show

Commit Message

Cédric Le Goater Feb. 24, 2015, 11:14 a.m. UTC
Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
---
 libfdt/fdt_strerror.c |    2 +-
 libfdt/libfdt.h       |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/libfdt/fdt_strerror.c b/libfdt/fdt_strerror.c
index 0538a8e5d518..de7c417c92b6 100644
--- a/libfdt/fdt_strerror.c
+++ b/libfdt/fdt_strerror.c
@@ -79,7 +79,7 @@  static struct fdt_errtabent fdt_errtable[] = {
 };
 #define FDT_ERRTABSIZE	(sizeof(fdt_errtable) / sizeof(fdt_errtable[0]))
 
-const char __attrconst *fdt_strerror(int errval)
+const char * __attrconst  fdt_strerror(int errval)
 {
 	if (errval > 0)
 		return "<valid offset/length>";
diff --git a/libfdt/libfdt.h b/libfdt/libfdt.h
index 0035bf78cf6e..e51f3644cd5b 100644
--- a/libfdt/libfdt.h
+++ b/libfdt/libfdt.h
@@ -51,6 +51,7 @@ 
  *     EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <compiler.h>
 #include <libfdt_env.h>
 #include <fdt.h>
 
@@ -1163,6 +1164,6 @@  int fdt_del_node(void *fdt, int nodeoffset);
 /* Debugging / informational functions                                */
 /**********************************************************************/
 
-const char *fdt_strerror(int errval);
+const char * __attrconst fdt_strerror(int errval);
 
 #endif /* _LIBFDT_H */