[libcamera-devel] [PATCH v1 4/9] libcamera: pipeline: raspberrypi: Constify parameter to StaggeredCtrl::set()

Naushir Patuck naush at raspberrypi.com
Mon Jun 29 18:58:01 CEST 2020


Hi Laruent,

Thank you for the patch.

On Mon, 29 Jun 2020 at 15:31, Niklas Söderlund
<niklas.soderlund at ragnatech.se> wrote:
>
> Hi Laurent,
>
> Thanks for your patch.
>
> On 2020-06-29 02:19:29 +0300, Laurent Pinchart wrote:
> > The controls parameter of StaggeredCtrl::set(), passed by reference, is
> > not modified by the function. Make it const.
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>
> Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>

Reviewed-by: Naushir Patuck <naush at raspberrypi.com>

>
> > ---
> >  src/libcamera/pipeline/raspberrypi/staggered_ctrl.cpp | 2 +-
> >  src/libcamera/pipeline/raspberrypi/staggered_ctrl.h   | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/src/libcamera/pipeline/raspberrypi/staggered_ctrl.cpp b/src/libcamera/pipeline/raspberrypi/staggered_ctrl.cpp
> > index 416cb9467147..0572acc93d63 100644
> > --- a/src/libcamera/pipeline/raspberrypi/staggered_ctrl.cpp
> > +++ b/src/libcamera/pipeline/raspberrypi/staggered_ctrl.cpp
> > @@ -91,7 +91,7 @@ bool StaggeredCtrl::set(std::initializer_list<std::pair<const uint32_t, int32_t>
> >       return true;
> >  }
> >
> > -bool StaggeredCtrl::set(ControlList &controls)
> > +bool StaggeredCtrl::set(const ControlList &controls)
> >  {
> >       std::lock_guard<std::mutex> lock(lock_);
> >
> > diff --git a/src/libcamera/pipeline/raspberrypi/staggered_ctrl.h b/src/libcamera/pipeline/raspberrypi/staggered_ctrl.h
> > index 98994a6177e1..382fa31a6853 100644
> > --- a/src/libcamera/pipeline/raspberrypi/staggered_ctrl.h
> > +++ b/src/libcamera/pipeline/raspberrypi/staggered_ctrl.h
> > @@ -41,7 +41,7 @@ public:
> >
> >       bool set(uint32_t ctrl, int32_t value);
> >       bool set(std::initializer_list<std::pair<const uint32_t, int32_t>> ctrlList);
> > -     bool set(ControlList &controls);
> > +     bool set(const ControlList &controls);
> >
> >       int write();
> >
> > --
> > Regards,
> >
> > Laurent Pinchart
> >
> > _______________________________________________
> > libcamera-devel mailing list
> > libcamera-devel at lists.libcamera.org
> > https://lists.libcamera.org/listinfo/libcamera-devel
>
> --
> Regards,
> Niklas Söderlund
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel


More information about the libcamera-devel mailing list