[libcamera-devel,1/3] libcamera: remove unused header
diff mbox series

Message ID 20220814095241.137108-1-Rauch.Christian@gmx.de
State Superseded
Headers show
Series
  • [libcamera-devel,1/3] libcamera: remove unused header
Related show

Commit Message

Christian Rauch Aug. 14, 2022, 9:52 a.m. UTC
---
 src/ipa/raspberrypi/raspberrypi.cpp             | 1 -
 test/serialization/ipa_data_serializer_test.cpp | 4 ----
 2 files changed, 5 deletions(-)

--
2.34.1

Comments

Laurent Pinchart Aug. 16, 2022, 3:44 a.m. UTC | #1
Hi Christian,

Thank you for the patch.

On Sun, Aug 14, 2022 at 11:52:39AM +0200, Christian Rauch via libcamera-devel wrote:


A commit message is needed, with a body and a Signed-off-by line. Same
for the other patches in the series.

> ---
>  src/ipa/raspberrypi/raspberrypi.cpp             | 1 -
>  test/serialization/ipa_data_serializer_test.cpp | 4 ----
>  2 files changed, 5 deletions(-)
> 
> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
> index 69c73f8c..8d731435 100644
> --- a/src/ipa/raspberrypi/raspberrypi.cpp
> +++ b/src/ipa/raspberrypi/raspberrypi.cpp
> @@ -49,7 +49,6 @@
>  #include "geq_status.h"
>  #include "lux_status.h"
>  #include "metadata.h"
> -#include "noise_status.h"

Out of curiosity, how did you figure out this was not needed ?

>  #include "sharpen_algorithm.h"
>  #include "sharpen_status.h"
> 
> diff --git a/test/serialization/ipa_data_serializer_test.cpp b/test/serialization/ipa_data_serializer_test.cpp
> index d2050a86..377ecdb0 100644
> --- a/test/serialization/ipa_data_serializer_test.cpp
> +++ b/test/serialization/ipa_data_serializer_test.cpp
> @@ -20,11 +20,7 @@
>  #include <libcamera/base/thread.h>
>  #include <libcamera/base/timer.h>
> 
> -#include "libcamera/internal/device_enumerator.h"
>  #include "libcamera/internal/ipa_data_serializer.h"
> -#include "libcamera/internal/ipa_manager.h"
> -#include "libcamera/internal/ipa_module.h"
> -#include "libcamera/internal/pipeline_handler.h"
> 
>  #include "serialization_test.h"
>  #include "test.h"
Kieran Bingham Aug. 16, 2022, 3:31 p.m. UTC | #2
Quoting Laurent Pinchart via libcamera-devel (2022-08-16 04:44:51)
> Hi Christian,
> 
> Thank you for the patch.
> 
> On Sun, Aug 14, 2022 at 11:52:39AM +0200, Christian Rauch via libcamera-devel wrote:
> 
> 
> A commit message is needed, with a body and a Signed-off-by line. Same
> for the other patches in the series.
> 
> > ---
> >  src/ipa/raspberrypi/raspberrypi.cpp             | 1 -
> >  test/serialization/ipa_data_serializer_test.cpp | 4 ----
> >  2 files changed, 5 deletions(-)
> > 
> > diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
> > index 69c73f8c..8d731435 100644
> > --- a/src/ipa/raspberrypi/raspberrypi.cpp
> > +++ b/src/ipa/raspberrypi/raspberrypi.cpp
> > @@ -49,7 +49,6 @@
> >  #include "geq_status.h"
> >  #include "lux_status.h"
> >  #include "metadata.h"
> > -#include "noise_status.h"
> 
> Out of curiosity, how did you figure out this was not needed ?

There's a tool called 'iwyu' (Include what you use) that I've used in
the past.

 iwyu_tool -p $BUILDDIR -j$NUMCPUS > iwyu.report

i.e.:
 iwyu_tool -p build/gcc/ -j32 > iwyu.report

And it provides some interesting information in iwyu.report

--
Kieran


> 
> >  #include "sharpen_algorithm.h"
> >  #include "sharpen_status.h"
> > 
> > diff --git a/test/serialization/ipa_data_serializer_test.cpp b/test/serialization/ipa_data_serializer_test.cpp
> > index d2050a86..377ecdb0 100644
> > --- a/test/serialization/ipa_data_serializer_test.cpp
> > +++ b/test/serialization/ipa_data_serializer_test.cpp
> > @@ -20,11 +20,7 @@
> >  #include <libcamera/base/thread.h>
> >  #include <libcamera/base/timer.h>
> > 
> > -#include "libcamera/internal/device_enumerator.h"
> >  #include "libcamera/internal/ipa_data_serializer.h"
> > -#include "libcamera/internal/ipa_manager.h"
> > -#include "libcamera/internal/ipa_module.h"
> > -#include "libcamera/internal/pipeline_handler.h"
> > 
> >  #include "serialization_test.h"
> >  #include "test.h"
> 
> -- 
> Regards,
> 
> Laurent Pinchart
Christian Rauch Aug. 16, 2022, 5:55 p.m. UTC | #3
Hi Laurent,

The issue was reported by my IDE (Qt Creator). As source, it just says
"clangd for libcamera". I don't know how to trigger this on the command
line. But I think there are other tools that check for unused headers,
e.g. the "Include What You Use" tool that Kieran mentioned.

Best,
Christian


Am 16.08.22 um 05:44 schrieb Laurent Pinchart:
> Hi Christian,
>
> Thank you for the patch.
>
> On Sun, Aug 14, 2022 at 11:52:39AM +0200, Christian Rauch via libcamera-devel wrote:
>
>
> A commit message is needed, with a body and a Signed-off-by line. Same
> for the other patches in the series.
>
>> ---
>>  src/ipa/raspberrypi/raspberrypi.cpp             | 1 -
>>  test/serialization/ipa_data_serializer_test.cpp | 4 ----
>>  2 files changed, 5 deletions(-)
>>
>> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
>> index 69c73f8c..8d731435 100644
>> --- a/src/ipa/raspberrypi/raspberrypi.cpp
>> +++ b/src/ipa/raspberrypi/raspberrypi.cpp
>> @@ -49,7 +49,6 @@
>>  #include "geq_status.h"
>>  #include "lux_status.h"
>>  #include "metadata.h"
>> -#include "noise_status.h"
>
> Out of curiosity, how did you figure out this was not needed ?
>
>>  #include "sharpen_algorithm.h"
>>  #include "sharpen_status.h"
>>
>> diff --git a/test/serialization/ipa_data_serializer_test.cpp b/test/serialization/ipa_data_serializer_test.cpp
>> index d2050a86..377ecdb0 100644
>> --- a/test/serialization/ipa_data_serializer_test.cpp
>> +++ b/test/serialization/ipa_data_serializer_test.cpp
>> @@ -20,11 +20,7 @@
>>  #include <libcamera/base/thread.h>
>>  #include <libcamera/base/timer.h>
>>
>> -#include "libcamera/internal/device_enumerator.h"
>>  #include "libcamera/internal/ipa_data_serializer.h"
>> -#include "libcamera/internal/ipa_manager.h"
>> -#include "libcamera/internal/ipa_module.h"
>> -#include "libcamera/internal/pipeline_handler.h"
>>
>>  #include "serialization_test.h"
>>  #include "test.h"
>

Patch
diff mbox series

diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
index 69c73f8c..8d731435 100644
--- a/src/ipa/raspberrypi/raspberrypi.cpp
+++ b/src/ipa/raspberrypi/raspberrypi.cpp
@@ -49,7 +49,6 @@ 
 #include "geq_status.h"
 #include "lux_status.h"
 #include "metadata.h"
-#include "noise_status.h"
 #include "sharpen_algorithm.h"
 #include "sharpen_status.h"

diff --git a/test/serialization/ipa_data_serializer_test.cpp b/test/serialization/ipa_data_serializer_test.cpp
index d2050a86..377ecdb0 100644
--- a/test/serialization/ipa_data_serializer_test.cpp
+++ b/test/serialization/ipa_data_serializer_test.cpp
@@ -20,11 +20,7 @@ 
 #include <libcamera/base/thread.h>
 #include <libcamera/base/timer.h>

-#include "libcamera/internal/device_enumerator.h"
 #include "libcamera/internal/ipa_data_serializer.h"
-#include "libcamera/internal/ipa_manager.h"
-#include "libcamera/internal/ipa_module.h"
-#include "libcamera/internal/pipeline_handler.h"

 #include "serialization_test.h"
 #include "test.h"