[libcamera-devel] ipa: ipa_interface: Add comment to defend the forward-declaration
diff mbox series

Message ID 20210315092456.13525-1-paul.elder@ideasonboard.com
State Accepted
Commit 0d0ac3cb132ec5aa1fd7ba7bc0c5b50c139049ba
Headers show
Series
  • [libcamera-devel] ipa: ipa_interface: Add comment to defend the forward-declaration
Related show

Commit Message

Paul Elder March 15, 2021, 9:24 a.m. UTC
Any struct that is defined in core.mojom with the skipHeader tag needs
to be present in ipa_interface, either forward-declared or #included.
Add an argument so that, in the future, people don't try to send patches
removing the seemingly unused forward-declaration.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
---
 include/libcamera/ipa/ipa_interface.h | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Niklas Söderlund March 15, 2021, 9:28 a.m. UTC | #1
Hi Paul,

Thanks for your patch.

On 2021-03-15 18:24:56 +0900, Paul Elder wrote:
> Any struct that is defined in core.mojom with the skipHeader tag needs
> to be present in ipa_interface, either forward-declared or #included.
> Add an argument so that, in the future, people don't try to send patches
> removing the seemingly unused forward-declaration.
> 
> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>

I have commented once that this forward declaration should be dropped 
and acked a patch that removes it, hopefully a comment reminding me to 
not do so will stop me in the future to make the same mistake ;-)

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

> ---
>  include/libcamera/ipa/ipa_interface.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h
> index 47f81d1d..5d99e2cf 100644
> --- a/include/libcamera/ipa/ipa_interface.h
> +++ b/include/libcamera/ipa/ipa_interface.h
> @@ -20,6 +20,11 @@
>  
>  namespace libcamera {
>  
> +/*
> + * Structs that are defined in core.mojom and have the skipHeader tag must be
> + * forward-declared or #included here.
> + */
> +
>  struct CameraSensorInfo;
>  
>  class IPAInterface
> -- 
> 2.27.0
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
Kieran Bingham March 15, 2021, 10:36 a.m. UTC | #2
Hi Paul,

On 15/03/2021 09:24, Paul Elder wrote:
> Any struct that is defined in core.mojom with the skipHeader tag needs
> to be present in ipa_interface, either forward-declared or #included.
> Add an argument so that, in the future, people don't try to send patches
> removing the seemingly unused forward-declaration.
> 

Thanks ;-) That will help me for sure!

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
> ---
>  include/libcamera/ipa/ipa_interface.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h
> index 47f81d1d..5d99e2cf 100644
> --- a/include/libcamera/ipa/ipa_interface.h
> +++ b/include/libcamera/ipa/ipa_interface.h
> @@ -20,6 +20,11 @@
>  
>  namespace libcamera {
>  
> +/*
> + * Structs that are defined in core.mojom and have the skipHeader tag must be
> + * forward-declared or #included here.
> + */
> +
>  struct CameraSensorInfo;
>  
>  class IPAInterface
>
Laurent Pinchart March 15, 2021, 11:26 p.m. UTC | #3
Hi Paul,

Thank you for the patch.

On Mon, Mar 15, 2021 at 06:24:56PM +0900, Paul Elder wrote:
> Any struct that is defined in core.mojom with the skipHeader tag needs
> to be present in ipa_interface, either forward-declared or #included.
> Add an argument so that, in the future, people don't try to send patches

s/argument/command/ ?

> removing the seemingly unused forward-declaration.
> 
> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  include/libcamera/ipa/ipa_interface.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h
> index 47f81d1d..5d99e2cf 100644
> --- a/include/libcamera/ipa/ipa_interface.h
> +++ b/include/libcamera/ipa/ipa_interface.h
> @@ -20,6 +20,11 @@
>  
>  namespace libcamera {
>  
> +/*
> + * Structs that are defined in core.mojom and have the skipHeader tag must be
> + * forward-declared or #included here.
> + */
> +
>  struct CameraSensorInfo;
>  
>  class IPAInterface
Paul Elder March 16, 2021, 2:16 a.m. UTC | #4
Hi Laurent,

On Tue, Mar 16, 2021 at 01:26:01AM +0200, Laurent Pinchart wrote:
> Hi Paul,
> 
> Thank you for the patch.
> 
> On Mon, Mar 15, 2021 at 06:24:56PM +0900, Paul Elder wrote:
> > Any struct that is defined in core.mojom with the skipHeader tag needs
> > to be present in ipa_interface, either forward-declared or #included.
> > Add an argument so that, in the future, people don't try to send patches
> 
> s/argument/command/ ?

Ah, so I typoed an entire word. What I meant was comment.


Thanks,

Paul

> > removing the seemingly unused forward-declaration.
> > 
> > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> > ---
> >  include/libcamera/ipa/ipa_interface.h | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h
> > index 47f81d1d..5d99e2cf 100644
> > --- a/include/libcamera/ipa/ipa_interface.h
> > +++ b/include/libcamera/ipa/ipa_interface.h
> > @@ -20,6 +20,11 @@
> >  
> >  namespace libcamera {
> >  
> > +/*
> > + * Structs that are defined in core.mojom and have the skipHeader tag must be
> > + * forward-declared or #included here.
> > + */
> > +
> >  struct CameraSensorInfo;
> >  
> >  class IPAInterface
Laurent Pinchart March 16, 2021, 2:22 a.m. UTC | #5
Hi Paul,

On Tue, Mar 16, 2021 at 11:16:45AM +0900, paul.elder@ideasonboard.com wrote:
> On Tue, Mar 16, 2021 at 01:26:01AM +0200, Laurent Pinchart wrote:
> > On Mon, Mar 15, 2021 at 06:24:56PM +0900, Paul Elder wrote:
> > > Any struct that is defined in core.mojom with the skipHeader tag needs
> > > to be present in ipa_interface, either forward-declared or #included.
> > > Add an argument so that, in the future, people don't try to send patches
> > 
> > s/argument/command/ ?
> 
> Ah, so I typoed an entire word. What I meant was comment.

So did I... :-)

> > > removing the seemingly unused forward-declaration.
> > > 
> > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
> > 
> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > 
> > > ---
> > >  include/libcamera/ipa/ipa_interface.h | 5 +++++
> > >  1 file changed, 5 insertions(+)
> > > 
> > > diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h
> > > index 47f81d1d..5d99e2cf 100644
> > > --- a/include/libcamera/ipa/ipa_interface.h
> > > +++ b/include/libcamera/ipa/ipa_interface.h
> > > @@ -20,6 +20,11 @@
> > >  
> > >  namespace libcamera {
> > >  
> > > +/*
> > > + * Structs that are defined in core.mojom and have the skipHeader tag must be
> > > + * forward-declared or #included here.
> > > + */
> > > +
> > >  struct CameraSensorInfo;
> > >  
> > >  class IPAInterface

Patch
diff mbox series

diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h
index 47f81d1d..5d99e2cf 100644
--- a/include/libcamera/ipa/ipa_interface.h
+++ b/include/libcamera/ipa/ipa_interface.h
@@ -20,6 +20,11 @@ 
 
 namespace libcamera {
 
+/*
+ * Structs that are defined in core.mojom and have the skipHeader tag must be
+ * forward-declared or #included here.
+ */
+
 struct CameraSensorInfo;
 
 class IPAInterface