[libcamera-devel,3/7] ipa: raspberrypi: ccm: Remove unnecessary atomic variable
diff mbox series

Message ID 20210204093457.6879-4-david.plowman@raspberrypi.com
State Accepted
Headers show
Series
  • Raspberry Pi IPA maintenance
Related show

Commit Message

David Plowman Feb. 4, 2021, 9:34 a.m. UTC
SetSaturation() gets called synchronously so there is no need for
saturation_ to be atomic.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
---
 src/ipa/raspberrypi/controller/rpi/ccm.hpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Laurent Pinchart Feb. 7, 2021, 2:05 p.m. UTC | #1
Hi David,

Thank you for the patch.

On Thu, Feb 04, 2021 at 09:34:53AM +0000, David Plowman wrote:
> SetSaturation() gets called synchronously so there is no need for
> saturation_ to be atomic.
> 
> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>

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

> ---
>  src/ipa/raspberrypi/controller/rpi/ccm.hpp | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/ipa/raspberrypi/controller/rpi/ccm.hpp b/src/ipa/raspberrypi/controller/rpi/ccm.hpp
> index fcf077e7..330ed51f 100644
> --- a/src/ipa/raspberrypi/controller/rpi/ccm.hpp
> +++ b/src/ipa/raspberrypi/controller/rpi/ccm.hpp
> @@ -7,7 +7,6 @@
>  #pragma once
>  
>  #include <vector>
> -#include <atomic>
>  
>  #include "../ccm_algorithm.hpp"
>  #include "../pwl.hpp"
> @@ -70,7 +69,7 @@ public:
>  
>  private:
>  	CcmConfig config_;
> -	std::atomic<double> saturation_;
> +	double saturation_;
>  };
>  
>  } // namespace RPiController

Patch
diff mbox series

diff --git a/src/ipa/raspberrypi/controller/rpi/ccm.hpp b/src/ipa/raspberrypi/controller/rpi/ccm.hpp
index fcf077e7..330ed51f 100644
--- a/src/ipa/raspberrypi/controller/rpi/ccm.hpp
+++ b/src/ipa/raspberrypi/controller/rpi/ccm.hpp
@@ -7,7 +7,6 @@ 
 #pragma once
 
 #include <vector>
-#include <atomic>
 
 #include "../ccm_algorithm.hpp"
 #include "../pwl.hpp"
@@ -70,7 +69,7 @@  public:
 
 private:
 	CcmConfig config_;
-	std::atomic<double> saturation_;
+	double saturation_;
 };
 
 } // namespace RPiController