[libcamera-devel] libcamera: framebuffer: Fix iscontiguous log message
diff mbox series

Message ID 20211104111347.3781990-1-kieran.bingham@ideasonboard.com
State Accepted
Commit 4b8c50bda21aa77fd8ae356dbf4def50add7c184
Headers show
Series
  • [libcamera-devel] libcamera: framebuffer: Fix iscontiguous log message
Related show

Commit Message

Kieran Bingham Nov. 4, 2021, 11:13 a.m. UTC
The isContiguous debug message is inverted.
Correct the logic.

Reported-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 src/libcamera/framebuffer.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jacopo Mondi Nov. 4, 2021, 4:09 p.m. UTC | #1
Hi

On Thu, Nov 04, 2021 at 11:13:47AM +0000, Kieran Bingham wrote:
> The isContiguous debug message is inverted.
> Correct the logic.
>
> Reported-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>

Thanks
   j

> ---
>  src/libcamera/framebuffer.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/libcamera/framebuffer.cpp b/src/libcamera/framebuffer.cpp
> index d44a98babd05..337ea1155a38 100644
> --- a/src/libcamera/framebuffer.cpp
> +++ b/src/libcamera/framebuffer.cpp
> @@ -247,7 +247,7 @@ FrameBuffer::FrameBuffer(const std::vector<Plane> &planes, unsigned int cookie)
>  	}
>
>  	LOG(Buffer, Debug)
> -		<< "Buffer is " << (isContiguous ? "not " : "") << "contiguous";
> +		<< "Buffer is " << (isContiguous ? "" : "not ") << "contiguous";
>
>  	_d()->isContiguous_ = isContiguous;
>  }
> --
> 2.30.2
>
Jean-Michel Hautbois Nov. 4, 2021, 4:14 p.m. UTC | #2
Hi Kieran and Roman !

On 04/11/2021 12:13, Kieran Bingham wrote:
> The isContiguous debug message is inverted.
> Correct the logic.
> 
> Reported-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

Thanks a lot !
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>

> ---
>   src/libcamera/framebuffer.cpp | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/framebuffer.cpp b/src/libcamera/framebuffer.cpp
> index d44a98babd05..337ea1155a38 100644
> --- a/src/libcamera/framebuffer.cpp
> +++ b/src/libcamera/framebuffer.cpp
> @@ -247,7 +247,7 @@ FrameBuffer::FrameBuffer(const std::vector<Plane> &planes, unsigned int cookie)
>   	}
>   
>   	LOG(Buffer, Debug)
> -		<< "Buffer is " << (isContiguous ? "not " : "") << "contiguous";
> +		<< "Buffer is " << (isContiguous ? "" : "not ") << "contiguous";
>   
>   	_d()->isContiguous_ = isContiguous;
>   }
>
Kieran Bingham Nov. 4, 2021, 4:16 p.m. UTC | #3
When applying I'll modify s/iscontiguous/isContiguous/ in the $SUBJECT
line.

--
KB

Quoting Kieran Bingham (2021-11-04 11:13:47)
> The isContiguous debug message is inverted.
> Correct the logic.
> 
> Reported-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> ---
>  src/libcamera/framebuffer.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/framebuffer.cpp b/src/libcamera/framebuffer.cpp
> index d44a98babd05..337ea1155a38 100644
> --- a/src/libcamera/framebuffer.cpp
> +++ b/src/libcamera/framebuffer.cpp
> @@ -247,7 +247,7 @@ FrameBuffer::FrameBuffer(const std::vector<Plane> &planes, unsigned int cookie)
>         }
>  
>         LOG(Buffer, Debug)
> -               << "Buffer is " << (isContiguous ? "not " : "") << "contiguous";
> +               << "Buffer is " << (isContiguous ? "" : "not ") << "contiguous";
>  
>         _d()->isContiguous_ = isContiguous;
>  }
> -- 
> 2.30.2
>

Patch
diff mbox series

diff --git a/src/libcamera/framebuffer.cpp b/src/libcamera/framebuffer.cpp
index d44a98babd05..337ea1155a38 100644
--- a/src/libcamera/framebuffer.cpp
+++ b/src/libcamera/framebuffer.cpp
@@ -247,7 +247,7 @@  FrameBuffer::FrameBuffer(const std::vector<Plane> &planes, unsigned int cookie)
 	}
 
 	LOG(Buffer, Debug)
-		<< "Buffer is " << (isContiguous ? "not " : "") << "contiguous";
+		<< "Buffer is " << (isContiguous ? "" : "not ") << "contiguous";
 
 	_d()->isContiguous_ = isContiguous;
 }