[v2] firmware: xlnx-zynqmp: fix compilation warning
diff mbox series

Message ID 1606205898-12642-1-git-send-email-wendy.liang@xilinx.com
State Accepted
Commit 463edf5a59fd8f0fe0135101d67bfca81d1e3771
Headers show
Series
  • [v2] firmware: xlnx-zynqmp: fix compilation warning
Related show

Commit Message

Jiaying Liang Nov. 24, 2020, 8:18 a.m. UTC
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(+)

Comments

Michal Simek Nov. 24, 2020, 2:28 p.m. UTC | #1
On 24. 11. 20 9:18, Wendy Liang wrote:
> 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
>  
> 

Applied for next.

M

Patch
diff mbox series

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