[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1605738706-375-1-git-send-email-wendy.liang@xilinx.com>
Date: Wed, 18 Nov 2020 14:31:46 -0800
From: Wendy Liang <wendy.liang@...inx.com>
To: <michal.simek@...inx.com>, <rajan.vaja@...inx.com>,
<gregkh@...uxfoundation.org>, <tejas.patel@...inx.com>,
<manish.narani@...inx.com>
CC: <linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>,
Wendy Liang <wendy.liang@...inx.com>
Subject: [PATCH] firmware: xlnx-zynqmp: fix compilation warning
Fix compilation warning when ZYNQMP_FIRMWARE is not defined.
include/linux/firmware/xlnx-zynqmp.h: In function
'zynqmp_pm_get_eemi_ops':
include/linux/firmware/xlnx-zynqmp.h:363:9: error: implicit
declaration of function 'ERR_PTR'
[-Werror=implicit-function-declaration]
363 | return ERR_PTR(-ENODEV);
include/linux/firmware/xlnx-zynqmp.h:363:18: note: each undeclared
identifier is reported only once for each function it appears in
include/linux/firmware/xlnx-zynqmp.h: In function
'zynqmp_pm_get_api_version':
include/linux/firmware/xlnx-zynqmp.h:367:10: error: 'ENODEV'
undeclared (first use in this function)
367 | return -ENODEV;
| ^~~~~~
Signed-off-by: Wendy Liang <wendy.liang@...inx.com>
---
include/linux/firmware/xlnx-zynqmp.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h
index 5968df8..7b6f9fc 100644
--- a/include/linux/firmware/xlnx-zynqmp.h
+++ b/include/linux/firmware/xlnx-zynqmp.h
@@ -13,6 +13,10 @@
#ifndef __FIRMWARE_ZYNQMP_H__
#define __FIRMWARE_ZYNQMP_H__
+#if !IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE)
+#include <linux/err.h>
+#endif
+
#define ZYNQMP_PM_VERSION_MAJOR 1
#define ZYNQMP_PM_VERSION_MINOR 0
--
2.7.4
Powered by blists - more mailing lists