[libcamera-devel] [PATCH v2 21/24] ipa: Declare the ipaCreate() function prototype

Niklas Söderlund niklas.soderlund at ragnatech.se
Tue Nov 19 00:06:27 CET 2019


Hi Laurent,

Thanks for your patch.

On 2019-11-08 22:54:06 +0200, Laurent Pinchart wrote:
> IPA modules have to implement a public ipaCreate() function, but its
> prototype isn't declared in any header file. This allows for modules to
> get the prototype wrong without being warned by the compiler. Fix it.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>

> ---
>  include/ipa/ipa_interface.h     |  2 ++
>  src/libcamera/ipa_interface.cpp | 10 ++++++++++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/include/ipa/ipa_interface.h b/include/ipa/ipa_interface.h
> index 3a423e37671f..92f1aac50b85 100644
> --- a/include/ipa/ipa_interface.h
> +++ b/include/ipa/ipa_interface.h
> @@ -80,6 +80,8 @@ struct ipa_context_ops {
>  			      const struct ipa_operation_data *data);
>  };
>  
> +struct ipa_context *ipaCreate();
> +
>  #ifdef __cplusplus
>  }
>  
> diff --git a/src/libcamera/ipa_interface.cpp b/src/libcamera/ipa_interface.cpp
> index 89fce0e8347f..cb2767a04711 100644
> --- a/src/libcamera/ipa_interface.cpp
> +++ b/src/libcamera/ipa_interface.cpp
> @@ -261,6 +261,16 @@
>   * \sa libcamera::IPAInterface::processEvent()
>   */
>  
> +/**
> + * \fn ipaCreate()
> + * \brief Entry point to the IPA modules
> + *
> + * This function is the entry point to the IPA modules. It is implemented by
> + * every IPA module, and called by libcamera to create a new IPA context.
> + *
> + * \return A newly created IPA context
> + */
> +
>  namespace libcamera {
>  
>  /**
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

-- 
Regards,
Niklas Söderlund


More information about the libcamera-devel mailing list