diff mbox series

[U-Boot] remoteproc: Fix potential build issues with SPL remoteproc

Message ID 20190719152756.1746-1-s-anna@ti.com
State Accepted
Delegated to: Tom Rini
Headers show
Series [U-Boot] remoteproc: Fix potential build issues with SPL remoteproc | expand

Commit Message

Suman Anna July 19, 2019, 3:27 p.m. UTC
The rproc uclass driver can either be built with SPL_REMOTEPROC
or REMOTEPROC, but the function prototypes in remoteproc.h are
defined only when CONFIG_REMOTEPROC is defined. This can cause
build issues in SPL if CONFIG_REMOTEPROC is not selected.

Fix this by replacing the existing precompiler macro usage with
CONFIG_IS_ENABLED.

Fixes: ddf56bc7e3ef ("drivers: Introduce a simplified remoteproc framework")
Signed-off-by: Suman Anna <s-anna@ti.com>
---
 include/remoteproc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nishanth Menon July 19, 2019, 4:17 p.m. UTC | #1
On 10:27-20190719, Suman Anna wrote:
> The rproc uclass driver can either be built with SPL_REMOTEPROC
> or REMOTEPROC, but the function prototypes in remoteproc.h are
> defined only when CONFIG_REMOTEPROC is defined. This can cause
> build issues in SPL if CONFIG_REMOTEPROC is not selected.
> 
> Fix this by replacing the existing precompiler macro usage with
> CONFIG_IS_ENABLED.
> 
> Fixes: ddf56bc7e3ef ("drivers: Introduce a simplified remoteproc framework")
> Signed-off-by: Suman Anna <s-anna@ti.com>
> ---
>  include/remoteproc.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/remoteproc.h b/include/remoteproc.h
> index a59dba84810f..6be737d8d119 100644
> --- a/include/remoteproc.h
> +++ b/include/remoteproc.h
> @@ -77,7 +77,7 @@ struct dm_rproc_ops {
>  /* Accessor */
>  #define rproc_get_ops(dev) ((struct dm_rproc_ops *)(dev)->driver->ops)
>  
> -#ifdef CONFIG_REMOTEPROC
> +#if CONFIG_IS_ENABLED(REMOTEPROC)
>  /**
>   * rproc_init() - Initialize all bound remote proc devices
>   *
> -- 
> 2.22.0
> 

Aaah.. Thanks..

Reviewed-by: Nishanth Menon <nm@ti.com>
Lokesh Vutla July 22, 2019, 4:17 a.m. UTC | #2
On 19/07/19 8:57 PM, Suman Anna wrote:
> The rproc uclass driver can either be built with SPL_REMOTEPROC
> or REMOTEPROC, but the function prototypes in remoteproc.h are
> defined only when CONFIG_REMOTEPROC is defined. This can cause
> build issues in SPL if CONFIG_REMOTEPROC is not selected.
> 
> Fix this by replacing the existing precompiler macro usage with
> CONFIG_IS_ENABLED.
> 
> Fixes: ddf56bc7e3ef ("drivers: Introduce a simplified remoteproc framework")
> Signed-off-by: Suman Anna <s-anna@ti.com>

Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>

Thanks and regards,
Lokesh
Tom Rini July 24, 2019, 8:08 p.m. UTC | #3
On Fri, Jul 19, 2019 at 10:27:56AM -0500, Suman Anna wrote:

> The rproc uclass driver can either be built with SPL_REMOTEPROC
> or REMOTEPROC, but the function prototypes in remoteproc.h are
> defined only when CONFIG_REMOTEPROC is defined. This can cause
> build issues in SPL if CONFIG_REMOTEPROC is not selected.
> 
> Fix this by replacing the existing precompiler macro usage with
> CONFIG_IS_ENABLED.
> 
> Fixes: ddf56bc7e3ef ("drivers: Introduce a simplified remoteproc framework")
> Signed-off-by: Suman Anna <s-anna@ti.com>
> Reviewed-by: Nishanth Menon <nm@ti.com>
> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/include/remoteproc.h b/include/remoteproc.h
index a59dba84810f..6be737d8d119 100644
--- a/include/remoteproc.h
+++ b/include/remoteproc.h
@@ -77,7 +77,7 @@  struct dm_rproc_ops {
 /* Accessor */
 #define rproc_get_ops(dev) ((struct dm_rproc_ops *)(dev)->driver->ops)
 
-#ifdef CONFIG_REMOTEPROC
+#if CONFIG_IS_ENABLED(REMOTEPROC)
 /**
  * rproc_init() - Initialize all bound remote proc devices
  *