From: Wendy Liang <wendy.liang@xilinx.com>
To: <michal.simek@xilinx.com>, <rajan.vaja@xilinx.com>,
<gregkh@linuxfoundation.org>, <tejas.patel@xilinx.com>,
<manish.narani@xilinx.com>
Cc: <linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
Wendy Liang <wendy.liang@xilinx.com>
Subject: [PATCH v2] firmware: xlnx-zynqmp: fix compilation warning
Date: Tue, 24 Nov 2020 00:18:18 -0800 [thread overview]
Message-ID: <1606205898-12642-1-git-send-email-wendy.liang@xilinx.com> (raw)
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@xilinx.com>
---
v2:
* Always include linux/err.h
---
include/linux/firmware/xlnx-zynqmp.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h
index 5968df8..f84244e 100644
--- a/include/linux/firmware/xlnx-zynqmp.h
+++ b/include/linux/firmware/xlnx-zynqmp.h
@@ -13,6 +13,8 @@
#ifndef __FIRMWARE_ZYNQMP_H__
#define __FIRMWARE_ZYNQMP_H__
+#include <linux/err.h>
+
#define ZYNQMP_PM_VERSION_MAJOR 1
#define ZYNQMP_PM_VERSION_MINOR 0
--
2.7.4
next reply other threads:[~2020-11-24 8:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-24 8:18 Wendy Liang [this message]
2020-11-24 14:28 ` [PATCH v2] firmware: xlnx-zynqmp: fix compilation warning Michal Simek
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=1606205898-12642-1-git-send-email-wendy.liang@xilinx.com \
--to=wendy.liang@xilinx.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manish.narani@xilinx.com \
--cc=michal.simek@xilinx.com \
--cc=rajan.vaja@xilinx.com \
--cc=tejas.patel@xilinx.com \
/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;
as well as URLs for NNTP newsgroup(s).