[{"id":28738,"web_url":"https://patchwork.libcamera.org/comment/28738/","msgid":"<mnbe7oifi6ojpz6wgxu6orhsz4kzvr2st2hfs4jnaq64ekknah@mppke2ohqdl5>","date":"2024-02-26T14:25:05","subject":"Re: [PATCH 0/2] libcamera: Add utils::to_underlying() helper","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Laurent\n\n for the series\n\n Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\nOn Sun, Feb 25, 2024 at 06:43:45PM +0200, Laurent Pinchart wrote:\n> Hello,\n>\n> C++23 has a std::to_underlying() helper that casts an enumeration to its\n> underlying type. libcamera open-codes this in multiple places. This\n> series adds an identical helper to the utils:: namespace, and uses it to\n> replace the open-coded implementations.\n>\n> Laurent Pinchart (2):\n>   libcamera: utils: Add to_underlying() helper function\n>   libcamera: Use utils::to_underlying()\n>\n>  include/libcamera/base/utils.h                 |  6 ++++++\n>  src/ipa/rpi/controller/rpi/sdn.cpp             |  3 ++-\n>  src/libcamera/base/utils.cpp                   | 10 ++++++++++\n>  src/libcamera/pipeline/rpi/common/rpi_stream.h | 10 +++-------\n>  src/libcamera/stream.cpp                       |  2 +-\n>  5 files changed, 22 insertions(+), 9 deletions(-)\n>\n>\n> base-commit: 059bbcdc34e7d887ee02fdd47613bd6e0eb70d16\n> --\n> Regards,\n>\n> Laurent Pinchart\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 9CB08BD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 26 Feb 2024 14:25:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D101662931;\n\tMon, 26 Feb 2024 15:25:10 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3326A62871\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Feb 2024 15:25:09 +0100 (CET)","from ideasonboard.com (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 99A47CD1;\n\tMon, 26 Feb 2024 15:24:57 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Oyb/RrNy\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1708957497;\n\tbh=/Lv5Z05CLaw9mnih0QxuIBfFN0RauHXvNo8r6P26MHw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Oyb/RrNy506qTqpmaaiPVS0uhpsKk7DPbX8nAi0L2j6Ahb35rUFOdTzbUw8BCKHXJ\n\twBdk5HFjDVwR66/za74tkAV4W0u4XOmKjhbh6pYJJU4R6m+M+xPKH8joMlUui7T35v\n\tpS8xOKIx+XUPNqE+w/thBbg3w8Ic+OSCb2tUMKQk=","Date":"Mon, 26 Feb 2024 15:25:05 +0100","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH 0/2] libcamera: Add utils::to_underlying() helper","Message-ID":"<mnbe7oifi6ojpz6wgxu6orhsz4kzvr2st2hfs4jnaq64ekknah@mppke2ohqdl5>","References":"<20240225164348.10073-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20240225164348.10073-1-laurent.pinchart@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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28747,"web_url":"https://patchwork.libcamera.org/comment/28747/","msgid":"<CAEmqJPrFBN5YeB5W1-dwVL408-RSPq4Ww54HBDHREon157eQaA@mail.gmail.com>","date":"2024-02-27T09:38:53","subject":"Re: [PATCH 0/2] libcamera: Add utils::to_underlying() helper","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Laurent,\n\nThanks for the fix.  For both patches:\n\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\n\n\nOn Sun, 25 Feb 2024 at 16:43, Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> Hello,\n>\n> C++23 has a std::to_underlying() helper that casts an enumeration to its\n> underlying type. libcamera open-codes this in multiple places. This\n> series adds an identical helper to the utils:: namespace, and uses it to\n> replace the open-coded implementations.\n>\n> Laurent Pinchart (2):\n>   libcamera: utils: Add to_underlying() helper function\n>   libcamera: Use utils::to_underlying()\n>\n>  include/libcamera/base/utils.h                 |  6 ++++++\n>  src/ipa/rpi/controller/rpi/sdn.cpp             |  3 ++-\n>  src/libcamera/base/utils.cpp                   | 10 ++++++++++\n>  src/libcamera/pipeline/rpi/common/rpi_stream.h | 10 +++-------\n>  src/libcamera/stream.cpp                       |  2 +-\n>  5 files changed, 22 insertions(+), 9 deletions(-)\n>\n>\n> base-commit: 059bbcdc34e7d887ee02fdd47613bd6e0eb70d16\n> --\n> Regards,\n>\n> Laurent Pinchart\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 CC20EBD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 27 Feb 2024 09:39:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E832C62866;\n\tTue, 27 Feb 2024 10:39:32 +0100 (CET)","from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com\n\t[IPv6:2607:f8b0:4864:20::1129])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D1690627FE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 27 Feb 2024 10:39:30 +0100 (CET)","by mail-yw1-x1129.google.com with SMTP id\n\t00721157ae682-6091e12b01fso12224337b3.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 27 Feb 2024 01:39:30 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"W2rnFc3M\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1709026769; x=1709631569;\n\tdarn=lists.libcamera.org; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=gDNtXNS3OnkU3/Js2oaBy7GQKIPl7huD0/8P5Dp2RrE=;\n\tb=W2rnFc3MeQj9sqgu0WxDp8kwIh0JWxuSYtuqLrmy7cLhrECPKki/qZnEGIXpCKSE4J\n\tyfVZTw7vZ9be0axJHi8jt8OuSQFpPY8/enPZn/PxufRcQ/b02SNM5gs4bEJlsQlU0IgG\n\thZb5kFcDzWS40LVlQbi7YvzzO1Pn4J0m+NxBvgd049sTYnZmRKMY0m4gLQnEcV4xie2c\n\tIYwOLdgSzjgrIhpglqs+DMHI40F7nrCTgZWDTea+4bTfO2Aoq1IfSngbviZQgLwpMosM\n\tZpKzEykI+y5J0+uwQ5ySNF8qk8AiQgHfUFrIJd070GRW5FpP4vxJ3fAjWRs5+RFaSn8c\n\tQSOA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1709026769; x=1709631569;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=gDNtXNS3OnkU3/Js2oaBy7GQKIPl7huD0/8P5Dp2RrE=;\n\tb=MaANGF1gVGSqtjKMUtTl5Kdq4eIKJsm8w1HOkgJbi67mbN6Diy2VOH3ToK3BCuguvD\n\tGrZF5BoWXx6rt4YgclGg4eUorj14B79K48D6nqiZONPie16UgmF7flxemoJXXAcYOHpX\n\trYR92oZZy4SHTMpPEK3CaZLtj7PA/UvshTdo87kPFCl0lakB2t/IaeX041ha89cRm9VQ\n\tNtQzpQy6ncYWXzakMoPfe63yVQ7jN3S/qn12AIRQpnmLajJmdF+1ifeoXd80u5X/zP16\n\tQfjU42M+k/P7iLwxepvXaRyDCpXngcVTYJLLZj+wVP3IlnAdStIiLgKG5SP9mRWtKxoN\n\ttgDQ==","X-Gm-Message-State":"AOJu0YzZoe2+IBjkQuUrsANgDgPDADs89Ysd9GeYCiZn9TMcvCb1G9Xz\n\t6pg60193nU9rnRIXn2yixyk1w+suDh6VrOePtDAXn1cpcHl65cLEP/sIcz/Ir0AeZ2vUamQk0TI\n\tgBaiFWJgtKSrl+tyQoz7ooiQxpU+R6p+6ozRnYI5tOCsDdC80","X-Google-Smtp-Source":"AGHT+IGKl4e2ezcRBuGtBMIf+ESHZnlvR/rGQn+Cl0WSIAUT9gY3GIPXchCdnmXHwKUX8/QHJvWrrruzBcSsmCU+fWA=","X-Received":"by 2002:a05:690c:809:b0:608:2201:93dc with SMTP id\n\tbx9-20020a05690c080900b00608220193dcmr1537045ywb.18.1709026769514;\n\tTue, 27 Feb 2024 01:39:29 -0800 (PST)","MIME-Version":"1.0","References":"<20240225164348.10073-1-laurent.pinchart@ideasonboard.com>","In-Reply-To":"<20240225164348.10073-1-laurent.pinchart@ideasonboard.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Tue, 27 Feb 2024 09:38:53 +0000","Message-ID":"<CAEmqJPrFBN5YeB5W1-dwVL408-RSPq4Ww54HBDHREon157eQaA@mail.gmail.com>","Subject":"Re: [PATCH 0/2] libcamera: Add utils::to_underlying() helper","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]