From patchwork Mon May 30 23:00:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 16124 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 357D1BD161 for ; Mon, 30 May 2022 23:00:55 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4DA4465633; Tue, 31 May 2022 01:00:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1653951654; bh=b+/yAQScyyAMX8DeFdGmt2lAVjwfgNZNlQl0H8XbWRw=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=WX1yy/ARTm8twYj4twhMbaCYEOFAFdVfkPeLa1gIdCJwyNYHvo6gJZ+p7aBbi5S1P 7UUhot5NK6BHkGv9yGkPo1iyDStg53JPiP/2s3g6BHk/70N9xP+8UaqgfkOZLXIfjh T0bnY/FYwC+8XHDUI9oOv01ydatTUDSXPmSpsQ1mjHjQWB5R7RpeqKIdl7Gr5ToR4v fQ5AaqSMtTekVfxC9hXJpW5UKd8b1YhtpEQTwFtgLxC3opz76gJnZwD7irdvFHcWW8 EC2MTzFr3DfE80dysZvoOT25DBZqlF7R51IFqBBI8PT0q38WIkXrW2rGWq6UMNb4/Z X34NutxViY+nw== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E07E160415 for ; Tue, 31 May 2022 01:00:52 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="XigQ6rhx"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (lmontsouris-659-1-41-236.w92-154.abo.wanadoo.fr [92.154.76.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7B8D06DF for ; Tue, 31 May 2022 01:00:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1653951651; bh=b+/yAQScyyAMX8DeFdGmt2lAVjwfgNZNlQl0H8XbWRw=; h=From:To:Subject:Date:From; b=XigQ6rhx6hTxywutiZ5VZssAU9J5TNGfw69uoCWKZLm/7JkktpCIobFCJZkzcFpj7 EKIkpYlrxbrHyxdevD3MIKO7aKXMHWb8DWwoJkrhZJR8KmVhwEn5I5TCKTa33VW0to akzeZMKj+MaodiM2+MsZJNZQm5ZU9gU8Aus55hhM= To: libcamera-devel@lists.libcamera.org Date: Tue, 31 May 2022 02:00:45 +0300 Message-Id: <20220530230045.5865-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: Fix incorrect toString() to operator<<() conversions X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Commit 8a845ab078c3 ("libcamera: Replace toString with operator<<() for format classes") incorrectly converted some of the toString() usages, resulting in pointer values being printed instead of formats. Fix it. Fixes: 8a845ab078c3 ("libcamera: Replace toString with operator<<() for format classes") Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Reviewed-by: Kieran Bingham --- src/libcamera/pipeline/ipu3/cio2.cpp | 2 +- src/libcamera/pipeline/ipu3/imgu.cpp | 4 ++-- src/libcamera/pipeline/simple/simple.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) base-commit: e115a691353151b3136581ac7f49cab6a3b0eb9a diff --git a/src/libcamera/pipeline/ipu3/cio2.cpp b/src/libcamera/pipeline/ipu3/cio2.cpp index a4e4d302f841..08e254f75eee 100644 --- a/src/libcamera/pipeline/ipu3/cio2.cpp +++ b/src/libcamera/pipeline/ipu3/cio2.cpp @@ -211,7 +211,7 @@ int CIO2Device::configure(const Size &size, V4L2DeviceFormat *outputFormat) if (ret) return ret; - LOG(IPU3, Debug) << "CIO2 output format " << outputFormat; + LOG(IPU3, Debug) << "CIO2 output format " << *outputFormat; return 0; } diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp index 34613feb8130..59305f85073c 100644 --- a/src/libcamera/pipeline/ipu3/imgu.cpp +++ b/src/libcamera/pipeline/ipu3/imgu.cpp @@ -479,7 +479,7 @@ int ImgUDevice::configure(const PipeConfig &pipeConfig, V4L2DeviceFormat *inputF if (ret) return ret; - LOG(IPU3, Debug) << "ImgU input format = " << inputFormat; + LOG(IPU3, Debug) << "ImgU input format = " << *inputFormat; /* * \todo The IPU3 driver implementation shall be changed to use the @@ -568,7 +568,7 @@ int ImgUDevice::configureVideoDevice(V4L2VideoDevice *dev, unsigned int pad, const char *name = dev == output_.get() ? "output" : "viewfinder"; LOG(IPU3, Debug) << "ImgU " << name << " format = " - << outputFormat; + << *outputFormat; return 0; } diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp index 76bd228b5aba..de75465eb3b5 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp @@ -610,7 +610,7 @@ int SimpleCameraData::setupFormats(V4L2SubdeviceFormat *format, << " produces " << sourceFormat << ", sink '" << sink->entity()->name() << "':" << sink->index() - << " requires " << format; + << " requires " << *format; return -EINVAL; } } @@ -620,7 +620,7 @@ int SimpleCameraData::setupFormats(V4L2SubdeviceFormat *format, << "':" << source->index() << " -> '" << sink->entity()->name() << "':" << sink->index() - << " configured with format " << format; + << " configured with format " << *format; } return 0;