soc: qcom: ocmem: add missing includes
Subsystems (2)
PATCH 1/1 soc: qcom: ocmem: add missing includes
The kbuild bot reported the following compiler errors when compiling on MIPS with CONFIG_QCOM_OCMEM disabled:
In file included from <command-line>:0:0:
Quoted 1 line
Quoted 1 line
include/soc/qcom/ocmem.h:43:49: warning: 'struct device' declared
inside parameter list will not be visible outside of this definition or declaration
static inline struct ocmem *of_get_ocmem(struct device *dev)
^~~~~~
include/soc/qcom/ocmem.h: In function 'of_get_ocmem':
Quoted 1 line
Quoted 1 line
include/soc/qcom/ocmem.h:45:9: error: implicit declaration of
function 'ERR_PTR' [-Werror=implicit-function-declaration]
return ERR_PTR(-ENODEV);
^~~~~~~Quoted 1 line
Quoted 1 line
include/soc/qcom/ocmem.h:45:18: error: 'ENODEV' undeclared (first
use in this function)
return ERR_PTR(-ENODEV);
Add the proper includes to fix the compiler errors.
---
My OCMEM series [1] hasn't landed upstream yet so let me know if you want me to squash this into the existing patch set. I made this a separate patch so that the Reported-by could be included. The kbuild report is at [2].
[1] https://lore.kernel.org/lkml/[email protected]/
[2] https://lists.01.org/pipermail/kbuild-all/2019-August/063530.html
include/soc/qcom/ocmem.h | 3 +++ 1 file changed, 3 insertions(+)
include/soc/qcom/ocmem.h +3 -0
@@ -9,6 +9,9 @@* Copyright (C) 2015 Red Hat. Author: Rob Clark <[email protected]> */ +#include <linux/device.h> +#include <linux/err.h> +#ifndef __OCMEM_H__#define __OCMEM_H__
Signature · 1 line
2.21.0
Quoted 14 lines · Brian Masney
The kbuild bot reported the following compiler errors when compiling on MIPS with
CONFIG_QCOM_OCMEMdisabled:In file included from <command-line>:0:0:
Quoted 1 line
Quoted 1 line
include/soc/qcom/ocmem.h:43:49: warning: 'struct device' declaredinside parameter list will not be visible outside of this definition or declaration
static inline struct ocmem *of_get_ocmem(struct device *dev)
^~~~~~
include/soc/qcom/ocmem.h: In function 'of_get_ocmem':Quoted 1 line
Quoted 1 line
include/soc/qcom/ocmem.h:45:9: error: implicit declaration offunction 'ERR_PTR' [-Werror=implicit-function-declaration] return ERR_PTR(-ENODEV); ^~~~~~~
Quoted 8 lines
Quoted 1 line
Quoted 1 line
include/soc/qcom/ocmem.h:45:18: error: 'ENODEV' undeclared (firstuse in this function)
returnERR_PTR(-ENODEV);Add the proper includes to fix the compiler errors.
Signed-off-by Brian Masney <[email protected]>Reported-by kbuild test robot <[email protected]>
Quoted 29 lines
---
My OCMEM series [1] hasn't landed upstream yet so let me know if you want me to squash this into the existing patch set. I made this a separate patch so that the Reported-by could be included. The kbuild report is at [2].[1] https://lore.kernel.org/lkml/[email protected]/
[2] https://lists.01.org/pipermail/kbuild-all/2019-August/063530.htmlinclude/soc/qcom/ocmem.h | 3 +++ 1 file changed, 3 insertions(+)include/soc/qcom/ocmem.h +3
-0@@ -9,6 +9,9 @@* Copyright (C) 2015 Red Hat. Author: Rob Clark <[email protected]> */ +#include <linux/device.h> +#include <linux/err.h> +#ifndef __OCMEM_H__#define __OCMEM_H__Signature · 1 line
2.21.0