[libcamera-devel] pipeline: raspberrypi: Remove unused getFormat call
diff mbox series

Message ID 20210328142711.29702-1-sebastian.fricke@posteo.net
State Accepted
Commit e99fc4b0d52957cf4ec493a55f2855d2d6ae201b
Headers show
Series
  • [libcamera-devel] pipeline: raspberrypi: Remove unused getFormat call
Related show

Commit Message

Sebastian Fricke March 28, 2021, 2:27 p.m. UTC
The comment states, that we get the device format to pass it to the IPA,
but the variable `sensorFormat` is not used again after it's assignment.
Remove it, together with the comment.

Signed-off-by: Sebastian Fricke <sebastian.fricke@posteo.net>
---
Tested on Raspberry Pi 4 with IMX219 without issues.
---
 src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 3 ---
 1 file changed, 3 deletions(-)

Comments

Laurent Pinchart March 28, 2021, 4:50 p.m. UTC | #1
Hi Sebastian,

Thank you for the patch.

On Sun, Mar 28, 2021 at 04:27:12PM +0200, Sebastian Fricke wrote:
> The comment states, that we get the device format to pass it to the IPA,
> but the variable `sensorFormat` is not used again after it's assignment.
> Remove it, together with the comment.

Looks like this unused variable has been there from the very first
version of the RPi pipeline handler.

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

I don't think there's any risk of a side effect here, but I'll let David
or Naush comment before applying the patch.

> Signed-off-by: Sebastian Fricke <sebastian.fricke@posteo.net>
> ---
> Tested on Raspberry Pi 4 with IMX219 without issues.
> ---
>  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> index 378a5227..f22e286e 100644
> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> @@ -1238,9 +1238,6 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)
>  	std::map<unsigned int, ControlInfoMap> entityControls;
>  	ipa::RPi::IPAConfig ipaConfig;
>  
> -	/* Get the device format to pass to the IPA. */
> -	V4L2DeviceFormat sensorFormat;
> -	unicam_[Unicam::Image].dev()->getFormat(&sensorFormat);
>  	/* Inform IPA of stream configuration and sensor controls. */
>  	unsigned int i = 0;
>  	for (auto const &stream : isp_) {
Naushir Patuck March 29, 2021, 6:57 a.m. UTC | #2
Hi Sebastian,

Thank you for your patch.

On Sun, 28 Mar 2021 at 15:27, Sebastian Fricke <sebastian.fricke@posteo.net>
wrote:

> The comment states, that we get the device format to pass it to the IPA,
> but the variable `sensorFormat` is not used again after it's assignment.
> Remove it, together with the comment.
>
> Signed-off-by: Sebastian Fricke <sebastian.fricke@posteo.net>
>

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


> ---
> Tested on Raspberry Pi 4 with IMX219 without issues.
> ---
>  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> index 378a5227..f22e286e 100644
> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> @@ -1238,9 +1238,6 @@ int RPiCameraData::configureIPA(const
> CameraConfiguration *config)
>         std::map<unsigned int, ControlInfoMap> entityControls;
>         ipa::RPi::IPAConfig ipaConfig;
>
> -       /* Get the device format to pass to the IPA. */
> -       V4L2DeviceFormat sensorFormat;
> -       unicam_[Unicam::Image].dev()->getFormat(&sensorFormat);
>         /* Inform IPA of stream configuration and sensor controls. */
>         unsigned int i = 0;
>         for (auto const &stream : isp_) {
> --
> 2.25.1
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
>

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index 378a5227..f22e286e 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -1238,9 +1238,6 @@  int RPiCameraData::configureIPA(const CameraConfiguration *config)
 	std::map<unsigned int, ControlInfoMap> entityControls;
 	ipa::RPi::IPAConfig ipaConfig;
 
-	/* Get the device format to pass to the IPA. */
-	V4L2DeviceFormat sensorFormat;
-	unicam_[Unicam::Image].dev()->getFormat(&sensorFormat);
 	/* Inform IPA of stream configuration and sensor controls. */
 	unsigned int i = 0;
 	for (auto const &stream : isp_) {