[{"id":20060,"web_url":"https://patchwork.libcamera.org/comment/20060/","msgid":"<YVwgDtIPULOf336m@pendragon.ideasonboard.com>","date":"2021-10-05T09:51:10","subject":"Re: [libcamera-devel] [RFC PATCH 0/6] Remove using namespace in\n\theader files","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Hiro,\n\nOn Tue, Oct 05, 2021 at 04:31:08PM +0900, Hirokazu Honda wrote:\n> According to Google C++ style guide, using-directives (i.e.\n> \"using namespace foo\") should not be used. However, libcamera has\n> been using the scheme in many files. Removing using-directives\n> entirely in the code definitely needs the dicussion.\n\nIndeed, that would need discussions :-) Part of the discussion would\nlikely touch the namespace name, libcamera is fairly long.\n\n> This patch series resolves the porblem of using using-directives\n> in header file, which I expect I can handily get the agreement\n> from developers. Using-directives in a header file is propagated\n> to all the files including the header file. This pollutes\n> namespace severely.\n\nOverall it looks fine to me, although I'm not sure it's such a big deal.\nYes, using directives are propagated, which is a bad idea in general,\nbut the header files below are all internal the the component they\nrelate to. The risk of namespace polution is thus more theoretical than\npractical.\n\nThis being said, we're already using this policy in the HAL headers, and\nI don't object extending it to all headers. I'll side with the majority.\n\n> [1] https://google.github.io/styleguide/cppguide.html#Namespaces\n> \n> Hirokazu Honda (6):\n>   ipa: raspberrypi: agc: Remove using namespace in agc.hpp\n>   cam: Remove using namespace in stream_options.h\n>   qcam: Remove using namespace in header files\n>   v4l2: Remove using namespace in header files\n>   lc-compliance: Remove using namespace in header files\n>   test: Remove using namespace in header files\n> \n>  src/cam/stream_options.h                      |  8 ++--\n>  src/ipa/raspberrypi/controller/rpi/agc.cpp    |  7 ++++\n>  src/ipa/raspberrypi/controller/rpi/agc.hpp    |  6 +--\n>  src/lc-compliance/environment.cpp             |  2 +-\n>  src/lc-compliance/environment.h               |  8 ++--\n>  src/qcam/dng_writer.h                         | 10 ++---\n>  src/qcam/main.cpp                             |  2 +-\n>  src/qcam/main_window.h                        | 40 +++++++++----------\n>  src/v4l2/v4l2_camera.h                        | 37 +++++++++--------\n>  src/v4l2/v4l2_camera_proxy.h                  | 15 ++++---\n>  src/v4l2/v4l2_compat_manager.h                |  4 +-\n>  test/camera/camera_reconfigure.cpp            |  1 +\n>  test/camera/capture.cpp                       |  1 +\n>  test/camera/configuration_default.cpp         |  1 +\n>  test/camera/configuration_set.cpp             |  1 +\n>  test/camera/statemachine.cpp                  |  1 +\n>  test/gstreamer/gstreamer_test.h               |  2 -\n>  test/libtest/buffer_source.cpp                |  2 +\n>  test/libtest/buffer_source.h                  | 10 ++---\n>  test/libtest/camera_test.h                    |  6 +--\n>  test/mapped-buffer.cpp                        |  1 +\n>  test/media_device/media_device_test.h         |  6 +--\n>  test/serialization/serialization_test.h       | 10 ++---\n>  test/v4l2_subdevice/v4l2_subdevice_test.h     |  8 ++--\n>  test/v4l2_videodevice/buffer_sharing.cpp      |  2 +\n>  test/v4l2_videodevice/capture_async.cpp       |  2 +\n>  test/v4l2_videodevice/v4l2_videodevice_test.h | 14 +++----\n>  27 files changed, 100 insertions(+), 107 deletions(-)","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 8F7C8C3243\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  5 Oct 2021 09:51:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id ED04C691BC;\n\tTue,  5 Oct 2021 11:51:18 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0B2D5684C6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  5 Oct 2021 11:51:18 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 797A425B;\n\tTue,  5 Oct 2021 11:51:17 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Ucl7cu1K\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1633427477;\n\tbh=My9+Yb0Y/PXPnRexkoDaHrbKmnVBUykIUoXtKNJtErI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Ucl7cu1KCrkxRGBdci2DToCiSJxjov1vrHAFISdbezB+gXXc9aVbSPBFNW3ZSZGc+\n\tRJ7q5iC2WoIzBcXceL81mtU46zdVjnX470oA5M8m25mctaKAnReJCVB7RMiUdcfh2Y\n\t/hHXmVmOaBiWKXGkW8D+FYI5a1gdS3rFqdk7hBUo=","Date":"Tue, 5 Oct 2021 12:51:10 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Hirokazu Honda <hiroh@chromium.org>","Message-ID":"<YVwgDtIPULOf336m@pendragon.ideasonboard.com>","References":"<20211005073114.3997303-1-hiroh@chromium.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20211005073114.3997303-1-hiroh@chromium.org>","Subject":"Re: [libcamera-devel] [RFC PATCH 0/6] Remove using namespace in\n\theader files","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":20314,"web_url":"https://patchwork.libcamera.org/comment/20314/","msgid":"<CAO5uPHNch-AZ1sLqMmusw-A_BsnA6ymyZAd1kukBf+gB22xM1A@mail.gmail.com>","date":"2021-10-20T02:26:26","subject":"Re: [libcamera-devel] [RFC PATCH 0/6] Remove using namespace in\n\theader files","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Laurent,\n\nWould you merge this patch series?\n\nOn Tue, Oct 5, 2021 at 6:51 PM Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> Hi Hiro,\n>\n> On Tue, Oct 05, 2021 at 04:31:08PM +0900, Hirokazu Honda wrote:\n> > According to Google C++ style guide, using-directives (i.e.\n> > \"using namespace foo\") should not be used. However, libcamera has\n> > been using the scheme in many files. Removing using-directives\n> > entirely in the code definitely needs the dicussion.\n>\n> Indeed, that would need discussions :-) Part of the discussion would\n> likely touch the namespace name, libcamera is fairly long.\n>\n> > This patch series resolves the porblem of using using-directives\n> > in header file, which I expect I can handily get the agreement\n> > from developers. Using-directives in a header file is propagated\n> > to all the files including the header file. This pollutes\n> > namespace severely.\n>\n> Overall it looks fine to me, although I'm not sure it's such a big deal.\n> Yes, using directives are propagated, which is a bad idea in general,\n> but the header files below are all internal the the component they\n> relate to. The risk of namespace polution is thus more theoretical than\n> practical.\n>\n> This being said, we're already using this policy in the HAL headers, and\n> I don't object extending it to all headers. I'll side with the majority.\n>\n> > [1] https://google.github.io/styleguide/cppguide.html#Namespaces\n> >\n> > Hirokazu Honda (6):\n> >   ipa: raspberrypi: agc: Remove using namespace in agc.hpp\n> >   cam: Remove using namespace in stream_options.h\n> >   qcam: Remove using namespace in header files\n> >   v4l2: Remove using namespace in header files\n> >   lc-compliance: Remove using namespace in header files\n> >   test: Remove using namespace in header files\n> >\n> >  src/cam/stream_options.h                      |  8 ++--\n> >  src/ipa/raspberrypi/controller/rpi/agc.cpp    |  7 ++++\n> >  src/ipa/raspberrypi/controller/rpi/agc.hpp    |  6 +--\n> >  src/lc-compliance/environment.cpp             |  2 +-\n> >  src/lc-compliance/environment.h               |  8 ++--\n> >  src/qcam/dng_writer.h                         | 10 ++---\n> >  src/qcam/main.cpp                             |  2 +-\n> >  src/qcam/main_window.h                        | 40 +++++++++----------\n> >  src/v4l2/v4l2_camera.h                        | 37 +++++++++--------\n> >  src/v4l2/v4l2_camera_proxy.h                  | 15 ++++---\n> >  src/v4l2/v4l2_compat_manager.h                |  4 +-\n> >  test/camera/camera_reconfigure.cpp            |  1 +\n> >  test/camera/capture.cpp                       |  1 +\n> >  test/camera/configuration_default.cpp         |  1 +\n> >  test/camera/configuration_set.cpp             |  1 +\n> >  test/camera/statemachine.cpp                  |  1 +\n> >  test/gstreamer/gstreamer_test.h               |  2 -\n> >  test/libtest/buffer_source.cpp                |  2 +\n> >  test/libtest/buffer_source.h                  | 10 ++---\n> >  test/libtest/camera_test.h                    |  6 +--\n> >  test/mapped-buffer.cpp                        |  1 +\n> >  test/media_device/media_device_test.h         |  6 +--\n> >  test/serialization/serialization_test.h       | 10 ++---\n> >  test/v4l2_subdevice/v4l2_subdevice_test.h     |  8 ++--\n> >  test/v4l2_videodevice/buffer_sharing.cpp      |  2 +\n> >  test/v4l2_videodevice/capture_async.cpp       |  2 +\n> >  test/v4l2_videodevice/v4l2_videodevice_test.h | 14 +++----\n> >  27 files changed, 100 insertions(+), 107 deletions(-)\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 1BC58BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 20 Oct 2021 02:26:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 46B5168F59;\n\tWed, 20 Oct 2021 04:26:38 +0200 (CEST)","from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com\n\t[IPv6:2a00:1450:4864:20::52d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 90FB660125\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 20 Oct 2021 04:26:36 +0200 (CEST)","by mail-ed1-x52d.google.com with SMTP id g10so19937315edj.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Oct 2021 19:26:36 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"HE3y+Zg6\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=kmaOdQ1qlR+eAb5CfyAkHqadzEV+JJ2JS+z7aw2StiE=;\n\tb=HE3y+Zg6et4pg+ae9fik3psCz6OueGM62Hi7GuIDgEkiflJ21nJ3HgqoxJkbIa2UUx\n\t34vNoGw/UBxMF18F0EVhza5qybturuprkvzQkTrAxnHzD0HrgRrpfxRrcIeQfIDxrquv\n\tqzXWPnbAOwNclGL/tJoevzvfeX7PZZNuCACyE=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=kmaOdQ1qlR+eAb5CfyAkHqadzEV+JJ2JS+z7aw2StiE=;\n\tb=4LLZL2/ybRLq7yk7Qw/W8HE9jPsojuaCNegl9lVl+CZECwDrHtbmL89OG2T7b0eUa9\n\tNdb4IE4HN1k5acLcMah13nMyvnxe6lEajW+cF74TNZQ6JEfIwmqpswKvc+AVzC5lqZFa\n\t+F3yrR83Do8gwwbFZGe5TaT7yM6qiN3dI9ngb6+QW/xjRXF+9GdIyL87xxjD+BhjTylN\n\tB1ALsqVfvrEXXuprsdKt34Yfp005y9mMuQT6sZJe3+mUbiM9Op9FRv1mz904tdTjPUmm\n\tChu25EsWLwbEbxIgIHuWL0VqfO2rfCx80p1OF+zEZCDvkrE3qFaAQhQq27DW1LpseJZE\n\tayDQ==","X-Gm-Message-State":"AOAM532gfYxp6f2PfE68gzt3xW0lMHg33yrxc1MvIFtBsHgD6lu/u3Lz\n\tYuVLsI92mB1bMbqXAR+avd1xZBgJuZ/4r4/JCo2IS1lnkXs=","X-Google-Smtp-Source":"ABdhPJwL5JChJcLTDdK4crRKqpVVE2lt13YJwm8V6r15WQmr1rpuSXYYI5jQ48f3UzNdbab9rusv3+tqqu5TprHyF2k=","X-Received":"by 2002:a17:906:1456:: with SMTP id\n\tq22mr41229903ejc.291.1634696796156; \n\tTue, 19 Oct 2021 19:26:36 -0700 (PDT)","MIME-Version":"1.0","References":"<20211005073114.3997303-1-hiroh@chromium.org>\n\t<YVwgDtIPULOf336m@pendragon.ideasonboard.com>","In-Reply-To":"<YVwgDtIPULOf336m@pendragon.ideasonboard.com>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Wed, 20 Oct 2021 11:26:26 +0900","Message-ID":"<CAO5uPHNch-AZ1sLqMmusw-A_BsnA6ymyZAd1kukBf+gB22xM1A@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [RFC PATCH 0/6] Remove using namespace in\n\theader files","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 <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":20315,"web_url":"https://patchwork.libcamera.org/comment/20315/","msgid":"<YW+BTq2xol6mwlzp@pendragon.ideasonboard.com>","date":"2021-10-20T02:39:10","subject":"Re: [libcamera-devel] [RFC PATCH 0/6] Remove using namespace in\n\theader files","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Hiro,\n\nOn Wed, Oct 20, 2021 at 11:26:26AM +0900, Hirokazu Honda wrote:\n> Hi Laurent,\n> \n> Would you merge this patch series?\n\nIt has been merged already :-)\n\n> On Tue, Oct 5, 2021 at 6:51 PM Laurent Pinchart wrote:\n> > On Tue, Oct 05, 2021 at 04:31:08PM +0900, Hirokazu Honda wrote:\n> > > According to Google C++ style guide, using-directives (i.e.\n> > > \"using namespace foo\") should not be used. However, libcamera has\n> > > been using the scheme in many files. Removing using-directives\n> > > entirely in the code definitely needs the dicussion.\n> >\n> > Indeed, that would need discussions :-) Part of the discussion would\n> > likely touch the namespace name, libcamera is fairly long.\n> >\n> > > This patch series resolves the porblem of using using-directives\n> > > in header file, which I expect I can handily get the agreement\n> > > from developers. Using-directives in a header file is propagated\n> > > to all the files including the header file. This pollutes\n> > > namespace severely.\n> >\n> > Overall it looks fine to me, although I'm not sure it's such a big deal.\n> > Yes, using directives are propagated, which is a bad idea in general,\n> > but the header files below are all internal the the component they\n> > relate to. The risk of namespace polution is thus more theoretical than\n> > practical.\n> >\n> > This being said, we're already using this policy in the HAL headers, and\n> > I don't object extending it to all headers. I'll side with the majority.\n> >\n> > > [1] https://google.github.io/styleguide/cppguide.html#Namespaces\n> > >\n> > > Hirokazu Honda (6):\n> > >   ipa: raspberrypi: agc: Remove using namespace in agc.hpp\n> > >   cam: Remove using namespace in stream_options.h\n> > >   qcam: Remove using namespace in header files\n> > >   v4l2: Remove using namespace in header files\n> > >   lc-compliance: Remove using namespace in header files\n> > >   test: Remove using namespace in header files\n> > >\n> > >  src/cam/stream_options.h                      |  8 ++--\n> > >  src/ipa/raspberrypi/controller/rpi/agc.cpp    |  7 ++++\n> > >  src/ipa/raspberrypi/controller/rpi/agc.hpp    |  6 +--\n> > >  src/lc-compliance/environment.cpp             |  2 +-\n> > >  src/lc-compliance/environment.h               |  8 ++--\n> > >  src/qcam/dng_writer.h                         | 10 ++---\n> > >  src/qcam/main.cpp                             |  2 +-\n> > >  src/qcam/main_window.h                        | 40 +++++++++----------\n> > >  src/v4l2/v4l2_camera.h                        | 37 +++++++++--------\n> > >  src/v4l2/v4l2_camera_proxy.h                  | 15 ++++---\n> > >  src/v4l2/v4l2_compat_manager.h                |  4 +-\n> > >  test/camera/camera_reconfigure.cpp            |  1 +\n> > >  test/camera/capture.cpp                       |  1 +\n> > >  test/camera/configuration_default.cpp         |  1 +\n> > >  test/camera/configuration_set.cpp             |  1 +\n> > >  test/camera/statemachine.cpp                  |  1 +\n> > >  test/gstreamer/gstreamer_test.h               |  2 -\n> > >  test/libtest/buffer_source.cpp                |  2 +\n> > >  test/libtest/buffer_source.h                  | 10 ++---\n> > >  test/libtest/camera_test.h                    |  6 +--\n> > >  test/mapped-buffer.cpp                        |  1 +\n> > >  test/media_device/media_device_test.h         |  6 +--\n> > >  test/serialization/serialization_test.h       | 10 ++---\n> > >  test/v4l2_subdevice/v4l2_subdevice_test.h     |  8 ++--\n> > >  test/v4l2_videodevice/buffer_sharing.cpp      |  2 +\n> > >  test/v4l2_videodevice/capture_async.cpp       |  2 +\n> > >  test/v4l2_videodevice/v4l2_videodevice_test.h | 14 +++----\n> > >  27 files changed, 100 insertions(+), 107 deletions(-)","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 7F96ABDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 20 Oct 2021 02:39:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E459668F5B;\n\tWed, 20 Oct 2021 04:39: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 21A6960125\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 20 Oct 2021 04:39:29 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 825E62A5;\n\tWed, 20 Oct 2021 04:39:28 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"JHh45gIF\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634697568;\n\tbh=QZUfUpo4notSbvvbTBYxHtTWLveF+cIlN1rO85waP6A=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=JHh45gIFaolOfWpKJgsNrNqA5gzfQG+JS3h9kzw7ecnAIg62dKBi0Hn2/ru6Yzc17\n\thOMAfl+YBiIx+ied6xqZfOtse6syn4bLo53vKekjK77S4Z7YUQpFtkIktcxIh3raPa\n\tilRBe+3s/dSecg8PfiVYULcVs9MI9vPvI5SBTJkQ=","Date":"Wed, 20 Oct 2021 05:39:10 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Hirokazu Honda <hiroh@chromium.org>","Message-ID":"<YW+BTq2xol6mwlzp@pendragon.ideasonboard.com>","References":"<20211005073114.3997303-1-hiroh@chromium.org>\n\t<YVwgDtIPULOf336m@pendragon.ideasonboard.com>\n\t<CAO5uPHNch-AZ1sLqMmusw-A_BsnA6ymyZAd1kukBf+gB22xM1A@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAO5uPHNch-AZ1sLqMmusw-A_BsnA6ymyZAd1kukBf+gB22xM1A@mail.gmail.com>","Subject":"Re: [libcamera-devel] [RFC PATCH 0/6] Remove using namespace in\n\theader files","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 <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":20317,"web_url":"https://patchwork.libcamera.org/comment/20317/","msgid":"<CAO5uPHNFb87PUruuY1se8cmwKxD60nrBRA-qvvt06GBC=OYGVg@mail.gmail.com>","date":"2021-10-20T03:01:52","subject":"Re: [libcamera-devel] [RFC PATCH 0/6] Remove using namespace in\n\theader files","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Laurent,\n\nOn Wed, Oct 20, 2021 at 11:39 AM Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> Hi Hiro,\n>\n> On Wed, Oct 20, 2021 at 11:26:26AM +0900, Hirokazu Honda wrote:\n> > Hi Laurent,\n> >\n> > Would you merge this patch series?\n>\n> It has been merged already :-)\n>\n\nI couldn't find the commits somehow.\nCould you tell me the commit hash?\n\n-Hiro\n\n> > On Tue, Oct 5, 2021 at 6:51 PM Laurent Pinchart wrote:\n> > > On Tue, Oct 05, 2021 at 04:31:08PM +0900, Hirokazu Honda wrote:\n> > > > According to Google C++ style guide, using-directives (i.e.\n> > > > \"using namespace foo\") should not be used. However, libcamera has\n> > > > been using the scheme in many files. Removing using-directives\n> > > > entirely in the code definitely needs the dicussion.\n> > >\n> > > Indeed, that would need discussions :-) Part of the discussion would\n> > > likely touch the namespace name, libcamera is fairly long.\n> > >\n> > > > This patch series resolves the porblem of using using-directives\n> > > > in header file, which I expect I can handily get the agreement\n> > > > from developers. Using-directives in a header file is propagated\n> > > > to all the files including the header file. This pollutes\n> > > > namespace severely.\n> > >\n> > > Overall it looks fine to me, although I'm not sure it's such a big deal.\n> > > Yes, using directives are propagated, which is a bad idea in general,\n> > > but the header files below are all internal the the component they\n> > > relate to. The risk of namespace polution is thus more theoretical than\n> > > practical.\n> > >\n> > > This being said, we're already using this policy in the HAL headers, and\n> > > I don't object extending it to all headers. I'll side with the majority.\n> > >\n> > > > [1] https://google.github.io/styleguide/cppguide.html#Namespaces\n> > > >\n> > > > Hirokazu Honda (6):\n> > > >   ipa: raspberrypi: agc: Remove using namespace in agc.hpp\n> > > >   cam: Remove using namespace in stream_options.h\n> > > >   qcam: Remove using namespace in header files\n> > > >   v4l2: Remove using namespace in header files\n> > > >   lc-compliance: Remove using namespace in header files\n> > > >   test: Remove using namespace in header files\n> > > >\n> > > >  src/cam/stream_options.h                      |  8 ++--\n> > > >  src/ipa/raspberrypi/controller/rpi/agc.cpp    |  7 ++++\n> > > >  src/ipa/raspberrypi/controller/rpi/agc.hpp    |  6 +--\n> > > >  src/lc-compliance/environment.cpp             |  2 +-\n> > > >  src/lc-compliance/environment.h               |  8 ++--\n> > > >  src/qcam/dng_writer.h                         | 10 ++---\n> > > >  src/qcam/main.cpp                             |  2 +-\n> > > >  src/qcam/main_window.h                        | 40 +++++++++----------\n> > > >  src/v4l2/v4l2_camera.h                        | 37 +++++++++--------\n> > > >  src/v4l2/v4l2_camera_proxy.h                  | 15 ++++---\n> > > >  src/v4l2/v4l2_compat_manager.h                |  4 +-\n> > > >  test/camera/camera_reconfigure.cpp            |  1 +\n> > > >  test/camera/capture.cpp                       |  1 +\n> > > >  test/camera/configuration_default.cpp         |  1 +\n> > > >  test/camera/configuration_set.cpp             |  1 +\n> > > >  test/camera/statemachine.cpp                  |  1 +\n> > > >  test/gstreamer/gstreamer_test.h               |  2 -\n> > > >  test/libtest/buffer_source.cpp                |  2 +\n> > > >  test/libtest/buffer_source.h                  | 10 ++---\n> > > >  test/libtest/camera_test.h                    |  6 +--\n> > > >  test/mapped-buffer.cpp                        |  1 +\n> > > >  test/media_device/media_device_test.h         |  6 +--\n> > > >  test/serialization/serialization_test.h       | 10 ++---\n> > > >  test/v4l2_subdevice/v4l2_subdevice_test.h     |  8 ++--\n> > > >  test/v4l2_videodevice/buffer_sharing.cpp      |  2 +\n> > > >  test/v4l2_videodevice/capture_async.cpp       |  2 +\n> > > >  test/v4l2_videodevice/v4l2_videodevice_test.h | 14 +++----\n> > > >  27 files changed, 100 insertions(+), 107 deletions(-)\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 E01F3BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 20 Oct 2021 03:02:03 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6305868F59;\n\tWed, 20 Oct 2021 05:02:03 +0200 (CEST)","from mail-ed1-x533.google.com (mail-ed1-x533.google.com\n\t[IPv6:2a00:1450:4864:20::533])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8CF0360125\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 20 Oct 2021 05:02:02 +0200 (CEST)","by mail-ed1-x533.google.com with SMTP id r18so20709467edv.12\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Oct 2021 20:02:02 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"JfzButAY\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=Wb8RzeFkdqUonmFjwAuQDQkf3YsRTmCPXc6aEMZos2c=;\n\tb=JfzButAYIyQcx6SDilEUvScjYkA0752uJYftN9U/OYJ8UxYlOXcHWOybO33h9U7pCx\n\tnh2w3+hI+hsTBGFZeF1trG1hTDkQbvybAnaWUfCmsmNnrvPpmt+kEZ1rtJdoVjs8Uvnz\n\t5umFXm3Pkq6mHfssBbKOLVC0x4mZ55I4U6ia4=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=Wb8RzeFkdqUonmFjwAuQDQkf3YsRTmCPXc6aEMZos2c=;\n\tb=kUBKzn3cN8nohlC2MIkEb3PGPgpnOrzBMJorNczniMRfne+YBbUud32ESaXKDFYD5G\n\tTWhvL2sHHdlAetYSGedC6sWjdNHAXbkGXA9h4wZ78Z6M3h+q8VSlhwnQNZTuKgSGE98y\n\titBEUEvnM8X+kF8XAQmxz56M4eVVfxe3RF07QPY9nI++owtGdVuiO5zZk2FQXCaFh1Nf\n\tXGnhgKbkCkk0Vy9rgSuSqbBBD1Wji+8OYEfcWf48bizObKFbyDvmP63X5FrbQM8QRxUH\n\to3g2pXIsnZ63aQDuJsgl/ChwpHQ7h8z1Otwq4TVd355S5vUrL3b8R+cO/0H55s4htgfQ\n\tavlA==","X-Gm-Message-State":"AOAM531dOX2rnhQ1mpvp2xJU7o7bf+dtzk2xBwyd7yUPukqIWNbnQM1I\n\txCTnXM4jHhFHW6eaIK4vwR/6yMIkTM0MFkEsfh9+3Q==","X-Google-Smtp-Source":"ABdhPJyz9dxQhfM7ML6oAvN7OMIzBbavqqivGLZ+OKduLXMFe3vTvjdUC223UpaY3lesyYnAqnqiqv4oyoQrK0N25+Q=","X-Received":"by 2002:a05:6402:2345:: with SMTP id\n\tr5mr58336625eda.202.1634698922124; \n\tTue, 19 Oct 2021 20:02:02 -0700 (PDT)","MIME-Version":"1.0","References":"<20211005073114.3997303-1-hiroh@chromium.org>\n\t<YVwgDtIPULOf336m@pendragon.ideasonboard.com>\n\t<CAO5uPHNch-AZ1sLqMmusw-A_BsnA6ymyZAd1kukBf+gB22xM1A@mail.gmail.com>\n\t<YW+BTq2xol6mwlzp@pendragon.ideasonboard.com>","In-Reply-To":"<YW+BTq2xol6mwlzp@pendragon.ideasonboard.com>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Wed, 20 Oct 2021 12:01:52 +0900","Message-ID":"<CAO5uPHNFb87PUruuY1se8cmwKxD60nrBRA-qvvt06GBC=OYGVg@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [RFC PATCH 0/6] Remove using namespace in\n\theader files","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 <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":20319,"web_url":"https://patchwork.libcamera.org/comment/20319/","msgid":"<YW+ISj0sE/EvpRYh@pendragon.ideasonboard.com>","date":"2021-10-20T03:08:58","subject":"Re: [libcamera-devel] [RFC PATCH 0/6] Remove using namespace in\n\theader files","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Hiro,\n\nOn Wed, Oct 20, 2021 at 12:01:52PM +0900, Hirokazu Honda wrote:\n> On Wed, Oct 20, 2021 at 11:39 AM Laurent Pinchart wrote:\n> > On Wed, Oct 20, 2021 at 11:26:26AM +0900, Hirokazu Honda wrote:\n> > > Hi Laurent,\n> > >\n> > > Would you merge this patch series?\n> >\n> > It has been merged already :-)\n> \n> I couldn't find the commits somehow.\n> Could you tell me the commit hash?\n\n1526650fc781 test: Remove using namespace in header files\naf60569cbc16 lc-compliance: Remove using namespace in header files\n4689b165720e v4l2: Remove using namespace in header files\nf277590d5cb1 qcam: Remove using namespace in header files\n3b93746907df cam: Remove using namespace in stream_options.h\nba7cf5d6544d ipa: raspberrypi: agc: Remove using namespace in agc.hpp\n\n> > > On Tue, Oct 5, 2021 at 6:51 PM Laurent Pinchart wrote:\n> > > > On Tue, Oct 05, 2021 at 04:31:08PM +0900, Hirokazu Honda wrote:\n> > > > > According to Google C++ style guide, using-directives (i.e.\n> > > > > \"using namespace foo\") should not be used. However, libcamera has\n> > > > > been using the scheme in many files. Removing using-directives\n> > > > > entirely in the code definitely needs the dicussion.\n> > > >\n> > > > Indeed, that would need discussions :-) Part of the discussion would\n> > > > likely touch the namespace name, libcamera is fairly long.\n> > > >\n> > > > > This patch series resolves the porblem of using using-directives\n> > > > > in header file, which I expect I can handily get the agreement\n> > > > > from developers. Using-directives in a header file is propagated\n> > > > > to all the files including the header file. This pollutes\n> > > > > namespace severely.\n> > > >\n> > > > Overall it looks fine to me, although I'm not sure it's such a big deal.\n> > > > Yes, using directives are propagated, which is a bad idea in general,\n> > > > but the header files below are all internal the the component they\n> > > > relate to. The risk of namespace polution is thus more theoretical than\n> > > > practical.\n> > > >\n> > > > This being said, we're already using this policy in the HAL headers, and\n> > > > I don't object extending it to all headers. I'll side with the majority.\n> > > >\n> > > > > [1] https://google.github.io/styleguide/cppguide.html#Namespaces\n> > > > >\n> > > > > Hirokazu Honda (6):\n> > > > >   ipa: raspberrypi: agc: Remove using namespace in agc.hpp\n> > > > >   cam: Remove using namespace in stream_options.h\n> > > > >   qcam: Remove using namespace in header files\n> > > > >   v4l2: Remove using namespace in header files\n> > > > >   lc-compliance: Remove using namespace in header files\n> > > > >   test: Remove using namespace in header files\n> > > > >\n> > > > >  src/cam/stream_options.h                      |  8 ++--\n> > > > >  src/ipa/raspberrypi/controller/rpi/agc.cpp    |  7 ++++\n> > > > >  src/ipa/raspberrypi/controller/rpi/agc.hpp    |  6 +--\n> > > > >  src/lc-compliance/environment.cpp             |  2 +-\n> > > > >  src/lc-compliance/environment.h               |  8 ++--\n> > > > >  src/qcam/dng_writer.h                         | 10 ++---\n> > > > >  src/qcam/main.cpp                             |  2 +-\n> > > > >  src/qcam/main_window.h                        | 40 +++++++++----------\n> > > > >  src/v4l2/v4l2_camera.h                        | 37 +++++++++--------\n> > > > >  src/v4l2/v4l2_camera_proxy.h                  | 15 ++++---\n> > > > >  src/v4l2/v4l2_compat_manager.h                |  4 +-\n> > > > >  test/camera/camera_reconfigure.cpp            |  1 +\n> > > > >  test/camera/capture.cpp                       |  1 +\n> > > > >  test/camera/configuration_default.cpp         |  1 +\n> > > > >  test/camera/configuration_set.cpp             |  1 +\n> > > > >  test/camera/statemachine.cpp                  |  1 +\n> > > > >  test/gstreamer/gstreamer_test.h               |  2 -\n> > > > >  test/libtest/buffer_source.cpp                |  2 +\n> > > > >  test/libtest/buffer_source.h                  | 10 ++---\n> > > > >  test/libtest/camera_test.h                    |  6 +--\n> > > > >  test/mapped-buffer.cpp                        |  1 +\n> > > > >  test/media_device/media_device_test.h         |  6 +--\n> > > > >  test/serialization/serialization_test.h       | 10 ++---\n> > > > >  test/v4l2_subdevice/v4l2_subdevice_test.h     |  8 ++--\n> > > > >  test/v4l2_videodevice/buffer_sharing.cpp      |  2 +\n> > > > >  test/v4l2_videodevice/capture_async.cpp       |  2 +\n> > > > >  test/v4l2_videodevice/v4l2_videodevice_test.h | 14 +++----\n> > > > >  27 files changed, 100 insertions(+), 107 deletions(-)","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 010B2BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 20 Oct 2021 03:09:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id ADE7468F5B;\n\tWed, 20 Oct 2021 05:09:18 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3D46560125\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 20 Oct 2021 05:09:17 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BED9E2A5;\n\tWed, 20 Oct 2021 05:09:16 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"eelnWgkC\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634699357;\n\tbh=d4nmN+Lkk0JWxCdPSTLg1UQoZPJtZ8KkxpHvFrVEnfY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=eelnWgkCdJY6bQMFe7l7H4hbms7e7I//X7vn6tdUmjcca5m+AZ3FC9mhgKj9UAK7R\n\tMHXok/1MGMubPxIFNfRduXC9E5ZgjC9vwlMMEI/zuj9bxYYpm+2mfFRFmHEIIT+PZS\n\tjUr9p1Lr8rM0yiTAc6zFFdAr+M4Kj8avjghyWXwE=","Date":"Wed, 20 Oct 2021 06:08:58 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Hirokazu Honda <hiroh@chromium.org>","Message-ID":"<YW+ISj0sE/EvpRYh@pendragon.ideasonboard.com>","References":"<20211005073114.3997303-1-hiroh@chromium.org>\n\t<YVwgDtIPULOf336m@pendragon.ideasonboard.com>\n\t<CAO5uPHNch-AZ1sLqMmusw-A_BsnA6ymyZAd1kukBf+gB22xM1A@mail.gmail.com>\n\t<YW+BTq2xol6mwlzp@pendragon.ideasonboard.com>\n\t<CAO5uPHNFb87PUruuY1se8cmwKxD60nrBRA-qvvt06GBC=OYGVg@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAO5uPHNFb87PUruuY1se8cmwKxD60nrBRA-qvvt06GBC=OYGVg@mail.gmail.com>","Subject":"Re: [libcamera-devel] [RFC PATCH 0/6] Remove using namespace in\n\theader files","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 <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":20321,"web_url":"https://patchwork.libcamera.org/comment/20321/","msgid":"<CAO5uPHOaWea=CaD-Nkioyp_wJpqX5-ePzxbuF0F2JW5Q26LrFA@mail.gmail.com>","date":"2021-10-20T03:11:52","subject":"Re: [libcamera-devel] [RFC PATCH 0/6] Remove using namespace in\n\theader files","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Laurent,\n\nOn Wed, Oct 20, 2021 at 12:09 PM Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> Hi Hiro,\n>\n> On Wed, Oct 20, 2021 at 12:01:52PM +0900, Hirokazu Honda wrote:\n> > On Wed, Oct 20, 2021 at 11:39 AM Laurent Pinchart wrote:\n> > > On Wed, Oct 20, 2021 at 11:26:26AM +0900, Hirokazu Honda wrote:\n> > > > Hi Laurent,\n> > > >\n> > > > Would you merge this patch series?\n> > >\n> > > It has been merged already :-)\n> >\n> > I couldn't find the commits somehow.\n> > Could you tell me the commit hash?\n>\n> 1526650fc781 test: Remove using namespace in header files\n> af60569cbc16 lc-compliance: Remove using namespace in header files\n> 4689b165720e v4l2: Remove using namespace in header files\n> f277590d5cb1 qcam: Remove using namespace in header files\n> 3b93746907df cam: Remove using namespace in stream_options.h\n> ba7cf5d6544d ipa: raspberrypi: agc: Remove using namespace in agc.hpp\n>\n\nThanks! I found them.\n\n> > > > On Tue, Oct 5, 2021 at 6:51 PM Laurent Pinchart wrote:\n> > > > > On Tue, Oct 05, 2021 at 04:31:08PM +0900, Hirokazu Honda wrote:\n> > > > > > According to Google C++ style guide, using-directives (i.e.\n> > > > > > \"using namespace foo\") should not be used. However, libcamera has\n> > > > > > been using the scheme in many files. Removing using-directives\n> > > > > > entirely in the code definitely needs the dicussion.\n> > > > >\n> > > > > Indeed, that would need discussions :-) Part of the discussion would\n> > > > > likely touch the namespace name, libcamera is fairly long.\n> > > > >\n> > > > > > This patch series resolves the porblem of using using-directives\n> > > > > > in header file, which I expect I can handily get the agreement\n> > > > > > from developers. Using-directives in a header file is propagated\n> > > > > > to all the files including the header file. This pollutes\n> > > > > > namespace severely.\n> > > > >\n> > > > > Overall it looks fine to me, although I'm not sure it's such a big deal.\n> > > > > Yes, using directives are propagated, which is a bad idea in general,\n> > > > > but the header files below are all internal the the component they\n> > > > > relate to. The risk of namespace polution is thus more theoretical than\n> > > > > practical.\n> > > > >\n> > > > > This being said, we're already using this policy in the HAL headers, and\n> > > > > I don't object extending it to all headers. I'll side with the majority.\n> > > > >\n> > > > > > [1] https://google.github.io/styleguide/cppguide.html#Namespaces\n> > > > > >\n> > > > > > Hirokazu Honda (6):\n> > > > > >   ipa: raspberrypi: agc: Remove using namespace in agc.hpp\n> > > > > >   cam: Remove using namespace in stream_options.h\n> > > > > >   qcam: Remove using namespace in header files\n> > > > > >   v4l2: Remove using namespace in header files\n> > > > > >   lc-compliance: Remove using namespace in header files\n> > > > > >   test: Remove using namespace in header files\n> > > > > >\n> > > > > >  src/cam/stream_options.h                      |  8 ++--\n> > > > > >  src/ipa/raspberrypi/controller/rpi/agc.cpp    |  7 ++++\n> > > > > >  src/ipa/raspberrypi/controller/rpi/agc.hpp    |  6 +--\n> > > > > >  src/lc-compliance/environment.cpp             |  2 +-\n> > > > > >  src/lc-compliance/environment.h               |  8 ++--\n> > > > > >  src/qcam/dng_writer.h                         | 10 ++---\n> > > > > >  src/qcam/main.cpp                             |  2 +-\n> > > > > >  src/qcam/main_window.h                        | 40 +++++++++----------\n> > > > > >  src/v4l2/v4l2_camera.h                        | 37 +++++++++--------\n> > > > > >  src/v4l2/v4l2_camera_proxy.h                  | 15 ++++---\n> > > > > >  src/v4l2/v4l2_compat_manager.h                |  4 +-\n> > > > > >  test/camera/camera_reconfigure.cpp            |  1 +\n> > > > > >  test/camera/capture.cpp                       |  1 +\n> > > > > >  test/camera/configuration_default.cpp         |  1 +\n> > > > > >  test/camera/configuration_set.cpp             |  1 +\n> > > > > >  test/camera/statemachine.cpp                  |  1 +\n> > > > > >  test/gstreamer/gstreamer_test.h               |  2 -\n> > > > > >  test/libtest/buffer_source.cpp                |  2 +\n> > > > > >  test/libtest/buffer_source.h                  | 10 ++---\n> > > > > >  test/libtest/camera_test.h                    |  6 +--\n> > > > > >  test/mapped-buffer.cpp                        |  1 +\n> > > > > >  test/media_device/media_device_test.h         |  6 +--\n> > > > > >  test/serialization/serialization_test.h       | 10 ++---\n> > > > > >  test/v4l2_subdevice/v4l2_subdevice_test.h     |  8 ++--\n> > > > > >  test/v4l2_videodevice/buffer_sharing.cpp      |  2 +\n> > > > > >  test/v4l2_videodevice/capture_async.cpp       |  2 +\n> > > > > >  test/v4l2_videodevice/v4l2_videodevice_test.h | 14 +++----\n> > > > > >  27 files changed, 100 insertions(+), 107 deletions(-)\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 9C6D0BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 20 Oct 2021 03:12:04 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5B3CF68F59;\n\tWed, 20 Oct 2021 05:12:04 +0200 (CEST)","from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com\n\t[IPv6:2a00:1450:4864:20::52b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2772760125\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 20 Oct 2021 05:12:03 +0200 (CEST)","by mail-ed1-x52b.google.com with SMTP id 5so19888007edw.7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Oct 2021 20:12:03 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"LRksfoLb\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=DGRv5Ijbl3sicKHBHJtmDo0K+DTGIqJ6LN4OgBDAKr0=;\n\tb=LRksfoLbONd+ryMm7y6HzJuBTFx/WVeTSnym0XyLQVLdUPbP3QWfC3VIW+WnmYLUSR\n\td00jgaDSh+uYjnhn7IXS8K0dDqB+jHoTx9k2tSOLYloqbQxaMVmsHi2sXfQC5zer4MfT\n\tKbPMCrQBdVxFIvd/4Qd8kl4+wvC5Pq/f8LPWI=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=DGRv5Ijbl3sicKHBHJtmDo0K+DTGIqJ6LN4OgBDAKr0=;\n\tb=J2pqAyTdiQWN8alchrW6ldTgkXctNVkTK+9ChA6HURdg27MdBvtYzHdfjXI/hovyIf\n\tL67t7bG7IuKNoHScB1g9zvHO/wmTa3yRBdf91nQoj6WJQad0bTBbyWVKt53ZEETw8oCd\n\tn4J4bF39BWjyvM97H7dKpfD0kyvjBaB5V9lizBmpcNoN2ip2YzjKoBozj2Qer1mxdNf7\n\tLDZLDBeNRV3jI8QbsvTrUUytxtuaHaZHKaxigj6jTwbbr69D3GZGC++ohs+fStM7XcPG\n\txstoap8xbkGtnjv6icmdEjjKMNOcx7/S9lDoCY/aee4Ctzf40r/e1IF3Ez/keN1/i0bj\n\thOWA==","X-Gm-Message-State":"AOAM530n7ftj24nfroS9k9LwitPgYTFZMNsGshf9CkZk7OexYztJiAvJ\n\tbLD/chyLLi4YJ7pTYvf7f7jzadTQQQ+usGFrE6JWvEIvwFY=","X-Google-Smtp-Source":"ABdhPJySb7zBjELMaxdXr7BwWahzb1It/B+9hw7EMGEhCN/NBCvf60+h0IWJe4B53KiVSDiQVlHsTrJzUbT0Eb3WMJw=","X-Received":"by 2002:a05:6402:2345:: with SMTP id\n\tr5mr58389931eda.202.1634699522839; \n\tTue, 19 Oct 2021 20:12:02 -0700 (PDT)","MIME-Version":"1.0","References":"<20211005073114.3997303-1-hiroh@chromium.org>\n\t<YVwgDtIPULOf336m@pendragon.ideasonboard.com>\n\t<CAO5uPHNch-AZ1sLqMmusw-A_BsnA6ymyZAd1kukBf+gB22xM1A@mail.gmail.com>\n\t<YW+BTq2xol6mwlzp@pendragon.ideasonboard.com>\n\t<CAO5uPHNFb87PUruuY1se8cmwKxD60nrBRA-qvvt06GBC=OYGVg@mail.gmail.com>\n\t<YW+ISj0sE/EvpRYh@pendragon.ideasonboard.com>","In-Reply-To":"<YW+ISj0sE/EvpRYh@pendragon.ideasonboard.com>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Wed, 20 Oct 2021 12:11:52 +0900","Message-ID":"<CAO5uPHOaWea=CaD-Nkioyp_wJpqX5-ePzxbuF0F2JW5Q26LrFA@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [RFC PATCH 0/6] Remove using namespace in\n\theader files","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 <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]