[PATCH 2/2] libcamera: ipa: Drop unneded includes from ipa_interface.h
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed Sep 4 13:07:46 CEST 2024
On Wed, Sep 04, 2024 at 12:02:10PM +0100, Kieran Bingham wrote:
> Quoting Laurent Pinchart (2024-09-02 23:13:17)
> > The ipa_interface.h file includes a number of headers that are not
> > directly used. Remove them, and add them to the source files that
> > include ipa_interface.h as required.
>
> Did you work through this manually? Or use a tool (like iwyu?).
This series is a follow-up on Milan's patch series, so it's manual.
> I saw
> some mails where Milan has referenced LSP ? What's that?
LSP stands for Language Server Protocol. It's a protocol to communicate
between code editors and components that know how to interpret a
particular language, to handle things like syntax highlighting, code
linting and other checks. It allows decoupling the language-specific
backends from the editors. I think it was initially developed for VS
code. Saying that "LSP" reported an issue is a bit of a language abuse I
think, it's the C++-specific backend, in this case clangd, that reported
the problems. A different C++ server would likely report different
issues.
> Anyway,
>
>
> Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
>
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> > ---
> > include/libcamera/ipa/ipa_interface.h | 7 -------
> > src/ipa/ipu3/ipu3.cpp | 2 ++
> > src/ipa/rkisp1/rkisp1.cpp | 1 +
> > src/ipa/vimc/vimc.cpp | 1 +
> > src/libcamera/pipeline/vimc/vimc.cpp | 3 +++
> > .../libcamera_templates/core_ipa_interface.h.tmpl | 4 ++++
> > .../libcamera_templates/module_ipa_interface.h.tmpl | 7 +++++++
> > 7 files changed, 18 insertions(+), 7 deletions(-)
> >
> > diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h
> > index 2fdc085e771f..dce9637a2238 100644
> > --- a/include/libcamera/ipa/ipa_interface.h
> > +++ b/include/libcamera/ipa/ipa_interface.h
> > @@ -7,13 +7,6 @@
> >
> > #pragma once
> >
> > -#include <libcamera/base/flags.h>
> > -#include <libcamera/base/signal.h>
> > -
> > -#include <libcamera/controls.h>
> > -#include <libcamera/framebuffer.h>
> > -#include <libcamera/geometry.h>
> > -
> > namespace libcamera {
> >
> > /*
> > diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
> > index 6ebf7c1dcab4..10a8c86d8e64 100644
> > --- a/src/ipa/ipu3/ipu3.cpp
> > +++ b/src/ipa/ipu3/ipu3.cpp
> > @@ -23,7 +23,9 @@
> > #include <libcamera/base/utils.h>
> >
> > #include <libcamera/control_ids.h>
> > +#include <libcamera/controls.h>
> > #include <libcamera/framebuffer.h>
> > +#include <libcamera/geometry.h>
> > #include <libcamera/request.h>
> >
> > #include <libcamera/ipa/ipa_interface.h>
> > diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
> > index f164d7c51ccf..78d2c375d6dc 100644
> > --- a/src/ipa/rkisp1/rkisp1.cpp
> > +++ b/src/ipa/rkisp1/rkisp1.cpp
> > @@ -18,6 +18,7 @@
> > #include <libcamera/base/log.h>
> >
> > #include <libcamera/control_ids.h>
> > +#include <libcamera/controls.h>
> > #include <libcamera/framebuffer.h>
> > #include <libcamera/request.h>
> >
> > diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp
> > index ebd63fa6cc09..5495401f1731 100644
> > --- a/src/ipa/vimc/vimc.cpp
> > +++ b/src/ipa/vimc/vimc.cpp
> > @@ -14,6 +14,7 @@
> > #include <iostream>
> >
> > #include <libcamera/base/file.h>
> > +#include <libcamera/base/flags.h>
> > #include <libcamera/base/log.h>
> >
> > #include <libcamera/ipa/ipa_interface.h>
> > diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp
> > index 0ec9928eec23..325174b90087 100644
> > --- a/src/libcamera/pipeline/vimc/vimc.cpp
> > +++ b/src/libcamera/pipeline/vimc/vimc.cpp
> > @@ -14,6 +14,7 @@
> > #include <linux/media-bus-format.h>
> > #include <linux/version.h>
> >
> > +#include <libcamera/base/flags.h>
> > #include <libcamera/base/log.h>
> > #include <libcamera/base/utils.h>
> >
> > @@ -21,6 +22,8 @@
> > #include <libcamera/control_ids.h>
> > #include <libcamera/controls.h>
> > #include <libcamera/formats.h>
> > +#include <libcamera/framebuffer.h>
> > +#include <libcamera/geometry.h>
> > #include <libcamera/request.h>
> > #include <libcamera/stream.h>
> >
> > diff --git a/utils/codegen/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl b/utils/codegen/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl
> > index 590135b88421..3942e5708d98 100644
> > --- a/utils/codegen/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl
> > +++ b/utils/codegen/ipc/generators/libcamera_templates/core_ipa_interface.h.tmpl
> > @@ -18,6 +18,10 @@
> > {% if has_string %}#include <string>{% endif %}
> > {% if has_array %}#include <vector>{% endif %}
> >
> > +#include <libcamera/controls.h>
> > +#include <libcamera/framebuffer.h>
> > +#include <libcamera/geometry.h>
> > +
> > #include <libcamera/ipa/ipa_interface.h>
> >
> > namespace libcamera {
> > diff --git a/utils/codegen/ipc/generators/libcamera_templates/module_ipa_interface.h.tmpl b/utils/codegen/ipc/generators/libcamera_templates/module_ipa_interface.h.tmpl
> > index 0111d0c4c591..5d70ea6a2c29 100644
> > --- a/utils/codegen/ipc/generators/libcamera_templates/module_ipa_interface.h.tmpl
> > +++ b/utils/codegen/ipc/generators/libcamera_templates/module_ipa_interface.h.tmpl
> > @@ -18,6 +18,13 @@
> > {% if has_string %}#include <string>{% endif %}
> > {% if has_array %}#include <vector>{% endif %}
> >
> > +#include <libcamera/base/flags.h>
> > +#include <libcamera/base/signal.h>
> > +
> > +#include <libcamera/controls.h>
> > +#include <libcamera/framebuffer.h>
> > +#include <libcamera/geometry.h>
> > +
> > #include <libcamera/ipa/core_ipa_interface.h>
> > #include <libcamera/ipa/ipa_interface.h>
> >
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list