[{"id":34400,"web_url":"https://patchwork.libcamera.org/comment/34400/","msgid":"<20250603135717.GA12117@pendragon.ideasonboard.com>","date":"2025-06-03T13:57:17","subject":"Re: [PATCH v1] android: camera_device: Do not pass `nullptr` to\n\t`Request::addBuffer()`","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Tue, Jun 03, 2025 at 03:45:35PM +0200, Barnabás Pőcze wrote:\n> The default argument already takes care of passing no fence to\n> `addBuffer()`, so there is no reason to specify `nullptr` explicitly.\n> \n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> ---\n>  src/android/camera_device.cpp | 3 +--\n>  1 file changed, 1 insertion(+), 2 deletions(-)\n> \n> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> index a038131ae..5dfa1fe22 100644\n> --- a/src/android/camera_device.cpp\n> +++ b/src/android/camera_device.cpp\n> @@ -1078,8 +1078,7 @@ int CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reques\n>  \t\tFrameBuffer *frameBuffer = cameraStream->getBuffer();\n>  \t\tbuffer.internalBuffer = frameBuffer;\n>  \n> -\t\tdescriptor->request_->addBuffer(sourceStream->stream(),\n> -\t\t\t\t\t\tframeBuffer, nullptr);\n> +\t\tdescriptor->request_->addBuffer(sourceStream->stream(), frameBuffer);\n\nI'd keep the original line wrap.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n>  \n>  \t\trequestedStreams.insert(sourceStream);\n>  \t}","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 4DD59C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  3 Jun 2025 13:57:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 64DB168D94;\n\tTue,  3 Jun 2025 15:57:30 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C4E31614D5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  3 Jun 2025 15:57:28 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 66B53496;\n\tTue,  3 Jun 2025 15:57:26 +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=\"mG/j/0R7\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1748959046;\n\tbh=FP+O5kH5QnGWD1f1DheS/DLAgk1OLgPch9Mt8f3gihg=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=mG/j/0R7bPTeNXUrH0uzf+RAMbR2ffgdzssIUtNVT3q+9LfS4tzuUup2AG+/d2MxI\n\tfKto7s41N/0QmxoIvrX26Q08Pa/vND3vvfl4YN6Ub5mIVln0QXE6xjFKs7c/TealNH\n\tnl4W1dI7XJF9fecduA3hXi1kd1Zf95Ct2kqLsbNc=","Date":"Tue, 3 Jun 2025 16:57:17 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v1] android: camera_device: Do not pass `nullptr` to\n\t`Request::addBuffer()`","Message-ID":"<20250603135717.GA12117@pendragon.ideasonboard.com>","References":"<20250603134535.772886-1-barnabas.pocze@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20250603134535.772886-1-barnabas.pocze@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>"}},{"id":34401,"web_url":"https://patchwork.libcamera.org/comment/34401/","msgid":"<174896513527.3299767.12009044380254399793@ping.linuxembedded.co.uk>","date":"2025-06-03T15:38:55","subject":"Re: [PATCH v1] android: camera_device: Do not pass `nullptr` to\n\t`Request::addBuffer()`","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2025-06-03 14:57:17)\n> On Tue, Jun 03, 2025 at 03:45:35PM +0200, Barnabás Pőcze wrote:\n> > The default argument already takes care of passing no fence to\n> > `addBuffer()`, so there is no reason to specify `nullptr` explicitly.\n> > \n> > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> > ---\n> >  src/android/camera_device.cpp | 3 +--\n> >  1 file changed, 1 insertion(+), 2 deletions(-)\n> > \n> > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> > index a038131ae..5dfa1fe22 100644\n> > --- a/src/android/camera_device.cpp\n> > +++ b/src/android/camera_device.cpp\n> > @@ -1078,8 +1078,7 @@ int CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reques\n> >               FrameBuffer *frameBuffer = cameraStream->getBuffer();\n> >               buffer.internalBuffer = frameBuffer;\n> >  \n> > -             descriptor->request_->addBuffer(sourceStream->stream(),\n> > -                                             frameBuffer, nullptr);\n> > +             descriptor->request_->addBuffer(sourceStream->stream(), frameBuffer);\n> \n> I'd keep the original line wrap.\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nCleaner without the nullptr indeed.\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n\n> \n> >  \n> >               requestedStreams.insert(sourceStream);\n> >       }\n> \n> -- \n> Regards,\n> \n> Laurent Pinchart","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 E7264C31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  3 Jun 2025 15:39:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 11C7D68D94;\n\tTue,  3 Jun 2025 17:39:00 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 71692614D5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  3 Jun 2025 17:38:58 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D0B25D7;\n\tTue,  3 Jun 2025 17:38:55 +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=\"HwK0CTta\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1748965135;\n\tbh=lnauzeRhxAm7WD+riyMzo4rzVxzOpzwNeyOMogb4VKA=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=HwK0CTtafLtGMgYjKuLbmZEWF/yRx8DI7oeSOOOCZpJSNeNuIpCIJs1egIuLDi+JC\n\tuqpMQxUshOigjvHx0tISJNi/6lnuzsyI1eTeqQq3dvqYKDlohGkkSDMojWe/wZwKnz\n\tqFBqJb1LYPLz+wCE5q+iHvzHIXk9eNByOuPxlWeI=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250603135717.GA12117@pendragon.ideasonboard.com>","References":"<20250603134535.772886-1-barnabas.pocze@ideasonboard.com>\n\t<20250603135717.GA12117@pendragon.ideasonboard.com>","Subject":"Re: [PATCH v1] android: camera_device: Do not pass `nullptr` to\n\t`Request::addBuffer()`","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Date":"Tue, 03 Jun 2025 16:38:55 +0100","Message-ID":"<174896513527.3299767.12009044380254399793@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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>"}}]