[{"id":31189,"web_url":"https://patchwork.libcamera.org/comment/31189/","msgid":"<zovvncbyydweqz3dicktlj3kkyef2ojtyfwz7kwivtl7kma7iy@ccpthsob7ll7>","date":"2024-09-12T09:01:25","subject":"Re: [PATCH v2 3/4] libcamera: media_device: Use MediaLink string\n\thelper","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/people/184/","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch. \n\nOn Wed, Sep 11, 2024 at 11:18:15PM +0200, Kieran Bingham wrote:\n> Replace the two open-coded implementations of a link representation\n> with the operator<< overload string representation to simplify\n> the code and unify appearance of reporting MediaLinks.\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nNow on the v2\nReviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> \n\nRegards,\nStefan\n\n> ---\n>  src/libcamera/media_device.cpp | 12 ++----------\n>  1 file changed, 2 insertions(+), 10 deletions(-)\n> \n> diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp\n> index bd054552a093..d71dad74df70 100644\n> --- a/src/libcamera/media_device.cpp\n> +++ b/src/libcamera/media_device.cpp\n> @@ -818,20 +818,12 @@ int MediaDevice::setupLink(const MediaLink *link, unsigned int flags)\n>  \tif (ret) {\n>  \t\tret = -errno;\n>  \t\tLOG(MediaDevice, Error)\n> -\t\t\t<< \"Failed to setup link \"\n> -\t\t\t<< source->entity()->name() << \"[\"\n> -\t\t\t<< source->index() << \"] -> \"\n> -\t\t\t<< sink->entity()->name() << \"[\"\n> -\t\t\t<< sink->index() << \"]: \"\n> +\t\t\t<< \"Failed to setup link \" << *link << \": \"\n>  \t\t\t<< strerror(-ret);\n>  \t\treturn ret;\n>  \t}\n>  \n> -\tLOG(MediaDevice, Debug)\n> -\t\t<< source->entity()->name() << \"[\"\n> -\t\t<< source->index() << \"] -> \"\n> -\t\t<< sink->entity()->name() << \"[\"\n> -\t\t<< sink->index() << \"]: \" << flags;\n> +\tLOG(MediaDevice, Debug) << *link << \": \" << flags;\n>  \n>  \treturn 0;\n>  }\n> -- \n> 2.46.0\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id B8AD3C324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 12 Sep 2024 09:01:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 94165634FB;\n\tThu, 12 Sep 2024 11:01:33 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0849E618F6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Sep 2024 11:01:32 +0200 (CEST)","from ideasonboard.com (213-229-8-243.static.upcbusiness.at\n\t[213.229.8.243])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4047B496;\n\tThu, 12 Sep 2024 11:00:12 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"NFL930Ah\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1726131612;\n\tbh=cUgh/1n1N8R43x32WdlnkBTbIQnOuVlnGLDhPogPX20=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=NFL930AhBknhvWFbifvx1lth+l0uLIYQgxrPh0MHEiDv44umVW+EyxpoixW5GFT0F\n\tGqHNagNsfm1B7q5MA2oGDJKV4+cGdD2o0jnx7sO4jaq9zOwcTg2Q8y6oDsHDfay7wR\n\tyr1FHadw+L0FXhrfpR50w7MMiW9YC/3R+41Ke6n0=","Date":"Thu, 12 Sep 2024 11:01:25 +0200","From":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>, \n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH v2 3/4] libcamera: media_device: Use MediaLink string\n\thelper","Message-ID":"<zovvncbyydweqz3dicktlj3kkyef2ojtyfwz7kwivtl7kma7iy@ccpthsob7ll7>","References":"<20240911211816.73763-1-kieran.bingham@ideasonboard.com>\n\t<20240911211816.73763-4-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20240911211816.73763-4-kieran.bingham@ideasonboard.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]