[{"id":4902,"web_url":"https://patchwork.libcamera.org/comment/4902/","msgid":"<fdfaee9016cabf39510a18a3dd2852924b6dd72e.camel@uajain.com>","date":"2020-05-26T05:24:52","subject":"Re: [libcamera-devel] [PATCH] libcamera: Declare functions before\n\tvariables in class definitions","submitter":{"id":1,"url":"https://patchwork.libcamera.org/api/people/1/","name":"Umang Jain","email":"email@uajain.com"},"content":"Hi Laurent,\n\nOn Tue, 2020-05-26 at 06:26 +0300, Laurent Pinchart wrote:\n> The preferred coding style in libcamera is to declare private\n> functions\n> before private variables in class definitions. This rule isn't\n> followed\n> by some of the internal classes. Update them accordingly.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  .../internal/device_enumerator_udev.h         | 16 ++++++------\n>  .../internal/event_dispatcher_poll.h          | 12 ++++-----\n>  include/libcamera/internal/ipa_manager.h      |  4 +--\n>  include/libcamera/internal/ipa_module.h       |  4 +--\n>  include/libcamera/internal/media_device.h     | 26 +++++++++------\n> ----\n>  include/libcamera/internal/media_object.h     |  4 +--\n>  6 files changed, 33 insertions(+), 33 deletions(-)\n> \nI spotted one more place that is not included in this patch, which\nis : include/libcamera/ipa_context_wrapper.h\n\nApart from that:\nReviewed-by: Umang Jain <email@uajain.com>\n> diff --git a/include/libcamera/internal/device_enumerator_udev.h\n> b/include/libcamera/internal/device_enumerator_udev.h\n> index fdaa20968ef0..10d17ed2abac 100644\n> --- a/include/libcamera/internal/device_enumerator_udev.h\n> +++ b/include/libcamera/internal/device_enumerator_udev.h\n> @@ -36,10 +36,6 @@ public:\n>  \tint enumerate() final;\n>  \n>  private:\n> -\tstruct udev *udev_;\n> -\tstruct udev_monitor *monitor_;\n> -\tEventNotifier *notifier_;\n> -\n>  \tusing DependencyMap = std::map<dev_t, std::list<MediaEntity\n> *>>;\n>  \n>  \tstruct MediaDeviceDeps {\n> @@ -58,16 +54,20 @@ private:\n>  \t\tDependencyMap deps_;\n>  \t};\n>  \n> -\tstd::set<dev_t> orphans_;\n> -\tstd::list<MediaDeviceDeps> pending_;\n> -\tstd::map<dev_t, MediaDeviceDeps *> devMap_;\n> -\n>  \tint addUdevDevice(struct udev_device *dev);\n>  \tint populateMediaDevice(MediaDevice *media, DependencyMap\n> *deps);\n>  \tstd::string lookupDeviceNode(dev_t devnum);\n>  \n>  \tint addV4L2Device(dev_t devnum);\n>  \tvoid udevNotify(EventNotifier *notifier);\n> +\n> +\tstruct udev *udev_;\n> +\tstruct udev_monitor *monitor_;\n> +\tEventNotifier *notifier_;\n> +\n> +\tstd::set<dev_t> orphans_;\n> +\tstd::list<MediaDeviceDeps> pending_;\n> +\tstd::map<dev_t, MediaDeviceDeps *> devMap_;\n>  };\n>  \n>  } /* namespace libcamera */\n> diff --git a/include/libcamera/internal/event_dispatcher_poll.h\n> b/include/libcamera/internal/event_dispatcher_poll.h\n> index 1f0738617425..3c9099660c4d 100644\n> --- a/include/libcamera/internal/event_dispatcher_poll.h\n> +++ b/include/libcamera/internal/event_dispatcher_poll.h\n> @@ -41,16 +41,16 @@ private:\n>  \t\tEventNotifier *notifiers[3];\n>  \t};\n>  \n> -\tstd::map<int, EventNotifierSetPoll> notifiers_;\n> -\tstd::list<Timer *> timers_;\n> -\tint eventfd_;\n> -\n> -\tbool processingEvents_;\n> -\n>  \tint poll(std::vector<struct pollfd> *pollfds);\n>  \tvoid processInterrupt(const struct pollfd &pfd);\n>  \tvoid processNotifiers(const std::vector<struct pollfd>\n> &pollfds);\n>  \tvoid processTimers();\n> +\n> +\tstd::map<int, EventNotifierSetPoll> notifiers_;\n> +\tstd::list<Timer *> timers_;\n> +\tint eventfd_;\n> +\n> +\tbool processingEvents_;\n>  };\n>  \n>  } /* namespace libcamera */\n> diff --git a/include/libcamera/internal/ipa_manager.h\n> b/include/libcamera/internal/ipa_manager.h\n> index 2412d75746ac..16d742918cf2 100644\n> --- a/include/libcamera/internal/ipa_manager.h\n> +++ b/include/libcamera/internal/ipa_manager.h\n> @@ -29,8 +29,6 @@ public:\n>  \t\t\t\t\t    uint32_t minVersion);\n>  \n>  private:\n> -\tstd::vector<IPAModule *> modules_;\n> -\n>  \tIPAManager();\n>  \t~IPAManager();\n>  \n> @@ -40,6 +38,8 @@ private:\n>  \n>  \tbool isSignatureValid(IPAModule *ipa) const;\n>  \n> +\tstd::vector<IPAModule *> modules_;\n> +\n>  #if HAVE_IPA_PUBKEY\n>  \tstatic const uint8_t publicKeyData_[];\n>  \tstatic const PubKey pubKey_;\n> diff --git a/include/libcamera/internal/ipa_module.h\n> b/include/libcamera/internal/ipa_module.h\n> index 5b54cb31a48a..788e31d8bf03 100644\n> --- a/include/libcamera/internal/ipa_module.h\n> +++ b/include/libcamera/internal/ipa_module.h\n> @@ -42,6 +42,8 @@ protected:\n>  \tstd::string logPrefix() const override;\n>  \n>  private:\n> +\tint loadIPAModuleInfo();\n> +\n>  \tstruct IPAModuleInfo info_;\n>  \tstd::vector<uint8_t> signature_;\n>  \n> @@ -52,8 +54,6 @@ private:\n>  \tvoid *dlHandle_;\n>  \ttypedef struct ipa_context *(*IPAIntfFactory)(void);\n>  \tIPAIntfFactory ipaCreate_;\n> -\n> -\tint loadIPAModuleInfo();\n>  };\n>  \n>  } /* namespace libcamera */\n> diff --git a/include/libcamera/internal/media_device.h\n> b/include/libcamera/internal/media_device.h\n> index 9fe76c514b17..19af059d9291 100644\n> --- a/include/libcamera/internal/media_device.h\n> +++ b/include/libcamera/internal/media_device.h\n> @@ -58,26 +58,13 @@ protected:\n>  \tstd::string logPrefix() const;\n>  \n>  private:\n> -\tstd::string driver_;\n> -\tstd::string deviceNode_;\n> -\tstd::string model_;\n> -\tunsigned int version_;\n> -\n> -\tint fd_;\n> -\tbool valid_;\n> -\tbool acquired_;\n> -\tbool lockOwner_;\n> -\n>  \tint open();\n>  \tvoid close();\n>  \n> -\tstd::map<unsigned int, MediaObject *> objects_;\n>  \tMediaObject *object(unsigned int id);\n>  \tbool addObject(MediaObject *object);\n>  \tvoid clear();\n>  \n> -\tstd::vector<MediaEntity *> entities_;\n> -\n>  \tstruct media_v2_interface *findInterface(const struct\n> media_v2_topology &topology,\n>  \t\t\t\t\t\t unsigned int\n> entityId);\n>  \tbool populateEntities(const struct media_v2_topology\n> &topology);\n> @@ -87,6 +74,19 @@ private:\n>  \n>  \tfriend int MediaLink::setEnabled(bool enable);\n>  \tint setupLink(const MediaLink *link, unsigned int flags);\n> +\n> +\tstd::string driver_;\n> +\tstd::string deviceNode_;\n> +\tstd::string model_;\n> +\tunsigned int version_;\n> +\n> +\tint fd_;\n> +\tbool valid_;\n> +\tbool acquired_;\n> +\tbool lockOwner_;\n> +\n> +\tstd::map<unsigned int, MediaObject *> objects_;\n> +\tstd::vector<MediaEntity *> entities_;\n>  };\n>  \n>  } /* namespace libcamera */\n> diff --git a/include/libcamera/internal/media_object.h\n> b/include/libcamera/internal/media_object.h\n> index 748eafdc880b..e8f2f27ce99e 100644\n> --- a/include/libcamera/internal/media_object.h\n> +++ b/include/libcamera/internal/media_object.h\n> @@ -107,6 +107,8 @@ private:\n>  \tMediaEntity(const MediaEntity &) = delete;\n>  \t~MediaEntity();\n>  \n> +\tvoid addPad(MediaPad *pad);\n> +\n>  \tstd::string name_;\n>  \tunsigned int function_;\n>  \tunsigned int flags_;\n> @@ -115,8 +117,6 @@ private:\n>  \tunsigned int minor_;\n>  \n>  \tstd::vector<MediaPad *> pads_;\n> -\n> -\tvoid addPad(MediaPad *pad);\n>  };\n>  \n>  } /* namespace libcamera */","headers":{"Return-Path":"<bounces+15657259-5c31-libcamera-devel=lists.libcamera.org@em7280.uajain.com>","Received":["from o1.f.az.sendgrid.net (o1.f.az.sendgrid.net [208.117.55.132])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B2056603CF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 26 May 2020 07:24:53 +0200 (CEST)","by filterdrecv-p3iad2-8ddf98858-z54vx with SMTP id\n\tfilterdrecv-p3iad2-8ddf98858-z54vx-21-5ECCA823-33\n\t2020-05-26 05:24:52.006824182 +0000 UTC m=+5285842.305045237","from mail.uajain.com (unknown)\n\tby ismtpd0001p1maa1.sendgrid.net (SG) with ESMTP\n\tid q2vRzlaZSiSMa56hIE336g Tue, 26 May 2020 05:24:51.257 +0000 (UTC)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=uajain.com\n\theader.i=@uajain.com header.b=\"XMDAbU/Q\"; \n\tdkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com;\n\th=subject:from:in-reply-to:references:content-type:mime-version:to:\n\tcontent-transfer-encoding;\n\ts=s1; bh=I766axyQj+kAeiTlWS/1RUEvvVkejAEhhwxR90/v9UQ=;\n\tb=XMDAbU/QEu7IZYciuM0cfTVdG7X6Gp54Tk093+H+tzB+nRl6939E2pqNo1HfMrOHYs9M\n\tKvh2VMotIOvHouiD33HnvQw5eroUCX2fSzFBvRRFJvz5l19Ptd3WGSOqmp1L6eIxaqhAfK\n\t+oWcR4SK07Vt+BidG80Ww79AdHtb3JOiM=","Message-ID":"<fdfaee9016cabf39510a18a3dd2852924b6dd72e.camel@uajain.com>","From":"Umang Jain <email@uajain.com>","Date":"Tue, 26 May 2020 05:24:52 +0000 (UTC)","In-Reply-To":"<20200526032635.13599-1-laurent.pinchart@ideasonboard.com>","References":"<20200526032635.13599-1-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=us-ascii","Mime-Version":"1.0","X-SG-EID":"1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPc4om/Oij3lMEQBxKPi/30O0h5UzjMeXuug363D2uQ6Tm5TYluqMN4DGmM/Drm7E99YttiGRVG40jCks/AkGgqaDadmIv1O8S/KjEcajOIGQ0CcAZxWkZPnmoLdXHesdcY21HDvGsUY28VkYPjwuitgcJKnwRcirt8M8SBaCNtnwTDFvWqyp+njA2kANO5eO0LI3qyeeWJbAeHldwM4d2oVA==","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH] libcamera: Declare functions before\n\tvariables in class definitions","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>","X-List-Received-Date":"Tue, 26 May 2020 05:24:54 -0000"}},{"id":4903,"web_url":"https://patchwork.libcamera.org/comment/4903/","msgid":"<68a2e36f13001a8f80d2c0f2dcf7909c59e4ed55.camel@uajain.com>","date":"2020-05-26T06:21:37","subject":"Re: [libcamera-devel] [PATCH] libcamera: Declare functions before\n\tvariables in class definitions","submitter":{"id":1,"url":"https://patchwork.libcamera.org/api/people/1/","name":"Umang Jain","email":"email@uajain.com"},"content":"On Tue, 2020-05-26 at 05:24 +0000, Umang Jain wrote:\n> Hi Laurent,\n> \n> On Tue, 2020-05-26 at 06:26 +0300, Laurent Pinchart wrote:\n> > The preferred coding style in libcamera is to declare private\n> > functions\n> > before private variables in class definitions. This rule isn't\n> > followed\n> > by some of the internal classes. Update them accordingly.\n> > \n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  .../internal/device_enumerator_udev.h         | 16 ++++++------\n> >  .../internal/event_dispatcher_poll.h          | 12 ++++-----\n> >  include/libcamera/internal/ipa_manager.h      |  4 +--\n> >  include/libcamera/internal/ipa_module.h       |  4 +--\n> >  include/libcamera/internal/media_device.h     | 26 +++++++++------\n> > ----\n> >  include/libcamera/internal/media_object.h     |  4 +--\n> >  6 files changed, 33 insertions(+), 33 deletions(-)\n> > \n> I spotted one more place that is not included in this patch, which\n> is : include/libcamera/ipa_context_wrapper.h\nApologies, the correct path is\ninclude/libcamera/internal/ipa_context_wrapper.h\n> \n> Apart from that:\n> Reviewed-by: Umang Jain <email@uajain.com>\n> > diff --git a/include/libcamera/internal/device_enumerator_udev.h\n> > b/include/libcamera/internal/device_enumerator_udev.h\n> > index fdaa20968ef0..10d17ed2abac 100644\n> > --- a/include/libcamera/internal/device_enumerator_udev.h\n> > +++ b/include/libcamera/internal/device_enumerator_udev.h\n> > @@ -36,10 +36,6 @@ public:\n> >  \tint enumerate() final;\n> >  \n> >  private:\n> > -\tstruct udev *udev_;\n> > -\tstruct udev_monitor *monitor_;\n> > -\tEventNotifier *notifier_;\n> > -\n> >  \tusing DependencyMap = std::map<dev_t, std::list<MediaEntity\n> > *>>;\n> >  \n> >  \tstruct MediaDeviceDeps {\n> > @@ -58,16 +54,20 @@ private:\n> >  \t\tDependencyMap deps_;\n> >  \t};\n> >  \n> > -\tstd::set<dev_t> orphans_;\n> > -\tstd::list<MediaDeviceDeps> pending_;\n> > -\tstd::map<dev_t, MediaDeviceDeps *> devMap_;\n> > -\n> >  \tint addUdevDevice(struct udev_device *dev);\n> >  \tint populateMediaDevice(MediaDevice *media, DependencyMap\n> > *deps);\n> >  \tstd::string lookupDeviceNode(dev_t devnum);\n> >  \n> >  \tint addV4L2Device(dev_t devnum);\n> >  \tvoid udevNotify(EventNotifier *notifier);\n> > +\n> > +\tstruct udev *udev_;\n> > +\tstruct udev_monitor *monitor_;\n> > +\tEventNotifier *notifier_;\n> > +\n> > +\tstd::set<dev_t> orphans_;\n> > +\tstd::list<MediaDeviceDeps> pending_;\n> > +\tstd::map<dev_t, MediaDeviceDeps *> devMap_;\n> >  };\n> >  \n> >  } /* namespace libcamera */\n> > diff --git a/include/libcamera/internal/event_dispatcher_poll.h\n> > b/include/libcamera/internal/event_dispatcher_poll.h\n> > index 1f0738617425..3c9099660c4d 100644\n> > --- a/include/libcamera/internal/event_dispatcher_poll.h\n> > +++ b/include/libcamera/internal/event_dispatcher_poll.h\n> > @@ -41,16 +41,16 @@ private:\n> >  \t\tEventNotifier *notifiers[3];\n> >  \t};\n> >  \n> > -\tstd::map<int, EventNotifierSetPoll> notifiers_;\n> > -\tstd::list<Timer *> timers_;\n> > -\tint eventfd_;\n> > -\n> > -\tbool processingEvents_;\n> > -\n> >  \tint poll(std::vector<struct pollfd> *pollfds);\n> >  \tvoid processInterrupt(const struct pollfd &pfd);\n> >  \tvoid processNotifiers(const std::vector<struct pollfd>\n> > &pollfds);\n> >  \tvoid processTimers();\n> > +\n> > +\tstd::map<int, EventNotifierSetPoll> notifiers_;\n> > +\tstd::list<Timer *> timers_;\n> > +\tint eventfd_;\n> > +\n> > +\tbool processingEvents_;\n> >  };\n> >  \n> >  } /* namespace libcamera */\n> > diff --git a/include/libcamera/internal/ipa_manager.h\n> > b/include/libcamera/internal/ipa_manager.h\n> > index 2412d75746ac..16d742918cf2 100644\n> > --- a/include/libcamera/internal/ipa_manager.h\n> > +++ b/include/libcamera/internal/ipa_manager.h\n> > @@ -29,8 +29,6 @@ public:\n> >  \t\t\t\t\t    uint32_t minVersion);\n> >  \n> >  private:\n> > -\tstd::vector<IPAModule *> modules_;\n> > -\n> >  \tIPAManager();\n> >  \t~IPAManager();\n> >  \n> > @@ -40,6 +38,8 @@ private:\n> >  \n> >  \tbool isSignatureValid(IPAModule *ipa) const;\n> >  \n> > +\tstd::vector<IPAModule *> modules_;\n> > +\n> >  #if HAVE_IPA_PUBKEY\n> >  \tstatic const uint8_t publicKeyData_[];\n> >  \tstatic const PubKey pubKey_;\n> > diff --git a/include/libcamera/internal/ipa_module.h\n> > b/include/libcamera/internal/ipa_module.h\n> > index 5b54cb31a48a..788e31d8bf03 100644\n> > --- a/include/libcamera/internal/ipa_module.h\n> > +++ b/include/libcamera/internal/ipa_module.h\n> > @@ -42,6 +42,8 @@ protected:\n> >  \tstd::string logPrefix() const override;\n> >  \n> >  private:\n> > +\tint loadIPAModuleInfo();\n> > +\n> >  \tstruct IPAModuleInfo info_;\n> >  \tstd::vector<uint8_t> signature_;\n> >  \n> > @@ -52,8 +54,6 @@ private:\n> >  \tvoid *dlHandle_;\n> >  \ttypedef struct ipa_context *(*IPAIntfFactory)(void);\n> >  \tIPAIntfFactory ipaCreate_;\n> > -\n> > -\tint loadIPAModuleInfo();\n> >  };\n> >  \n> >  } /* namespace libcamera */\n> > diff --git a/include/libcamera/internal/media_device.h\n> > b/include/libcamera/internal/media_device.h\n> > index 9fe76c514b17..19af059d9291 100644\n> > --- a/include/libcamera/internal/media_device.h\n> > +++ b/include/libcamera/internal/media_device.h\n> > @@ -58,26 +58,13 @@ protected:\n> >  \tstd::string logPrefix() const;\n> >  \n> >  private:\n> > -\tstd::string driver_;\n> > -\tstd::string deviceNode_;\n> > -\tstd::string model_;\n> > -\tunsigned int version_;\n> > -\n> > -\tint fd_;\n> > -\tbool valid_;\n> > -\tbool acquired_;\n> > -\tbool lockOwner_;\n> > -\n> >  \tint open();\n> >  \tvoid close();\n> >  \n> > -\tstd::map<unsigned int, MediaObject *> objects_;\n> >  \tMediaObject *object(unsigned int id);\n> >  \tbool addObject(MediaObject *object);\n> >  \tvoid clear();\n> >  \n> > -\tstd::vector<MediaEntity *> entities_;\n> > -\n> >  \tstruct media_v2_interface *findInterface(const struct\n> > media_v2_topology &topology,\n> >  \t\t\t\t\t\t unsigned int\n> > entityId);\n> >  \tbool populateEntities(const struct media_v2_topology\n> > &topology);\n> > @@ -87,6 +74,19 @@ private:\n> >  \n> >  \tfriend int MediaLink::setEnabled(bool enable);\n> >  \tint setupLink(const MediaLink *link, unsigned int flags);\n> > +\n> > +\tstd::string driver_;\n> > +\tstd::string deviceNode_;\n> > +\tstd::string model_;\n> > +\tunsigned int version_;\n> > +\n> > +\tint fd_;\n> > +\tbool valid_;\n> > +\tbool acquired_;\n> > +\tbool lockOwner_;\n> > +\n> > +\tstd::map<unsigned int, MediaObject *> objects_;\n> > +\tstd::vector<MediaEntity *> entities_;\n> >  };\n> >  \n> >  } /* namespace libcamera */\n> > diff --git a/include/libcamera/internal/media_object.h\n> > b/include/libcamera/internal/media_object.h\n> > index 748eafdc880b..e8f2f27ce99e 100644\n> > --- a/include/libcamera/internal/media_object.h\n> > +++ b/include/libcamera/internal/media_object.h\n> > @@ -107,6 +107,8 @@ private:\n> >  \tMediaEntity(const MediaEntity &) = delete;\n> >  \t~MediaEntity();\n> >  \n> > +\tvoid addPad(MediaPad *pad);\n> > +\n> >  \tstd::string name_;\n> >  \tunsigned int function_;\n> >  \tunsigned int flags_;\n> > @@ -115,8 +117,6 @@ private:\n> >  \tunsigned int minor_;\n> >  \n> >  \tstd::vector<MediaPad *> pads_;\n> > -\n> > -\tvoid addPad(MediaPad *pad);\n> >  };\n> >  \n> >  } /* namespace libcamera */\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://u15657259.ct.sendgrid.net/ls/click?upn=8H1KCc2bev8KdIveckpOEBeWjI3THEr-2F8W-2FrEpvXj1fUaD8nZSgfyCwFn-2BKX4QPmXiU9H2IGCLkMp0Cw1NTkpQ-3D-3DzQdG_C3wFy2Q4UgRsRLDAYieRZ5Z3EhAWyy0-2FkOzyYc6FPc1dn6ROcAJqKXb9hjP566uP6jUnxKU2JYw41zoRJ3n6FfFynnIkRxAddEjNjj165XJ-2FRNlSgfWT9Aqv6PykMK3xWdzLEAb3cLCNkDxVPVRb0Ac3agobniytGjxx3v5SKbA2Q1FuCZUndHBCF41S29TO8ogj61uOtLN-2FRYoijKcI7vM7Hbyls6PmzrlTekav1UNBi6yovb12Oa-2Fluzl0tiq9","headers":{"Return-Path":"<bounces+15657259-5c31-libcamera-devel=lists.libcamera.org@em7280.uajain.com>","Received":["from o1.f.az.sendgrid.net (o1.f.az.sendgrid.net [208.117.55.132])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CAF5E603CF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 26 May 2020 08:21:38 +0200 (CEST)","by filterdrecv-p3iad2-8ddf98858-lwgxm with SMTP id\n\tfilterdrecv-p3iad2-8ddf98858-lwgxm-19-5ECCB571-1D\n\t2020-05-26 06:21:37.446403492 +0000 UTC m=+5289247.030549418","from mail.uajain.com (unknown)\n\tby ismtpd0008p1hnd1.sendgrid.net (SG) with ESMTP\n\tid JFIklraDSWOrRk6KFzhHvw Tue, 26 May 2020 06:21:36.912 +0000 (UTC)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=uajain.com\n\theader.i=@uajain.com header.b=\"X5+EiMs3\"; \n\tdkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com;\n\th=subject:from:in-reply-to:references:content-type:mime-version:to:\n\tcontent-transfer-encoding;\n\ts=s1; bh=alj4NXr0oOpov/Z+yvMX1Iicb7FkQebMK7Yih/HRWMo=;\n\tb=X5+EiMs37V4Qp2eg20iHi8NL+Gz7a3E5WHdf71GGdJG2xgJdtWsgdE2gfym5QEYQa0L9\n\tdhPJV7Et4Wt2sOCZM071cLb5FYiKCkpVY58EtNrkfciH52tloPAdyOSnhx/1sBXdG0oRcc\n\tqohtHcR3rTMuyOk6pvnEDCTfpjEBN305M=","Message-ID":"<68a2e36f13001a8f80d2c0f2dcf7909c59e4ed55.camel@uajain.com>","From":"Umang Jain <email@uajain.com>","Date":"Tue, 26 May 2020 06:21:37 +0000 (UTC)","In-Reply-To":"<fdfaee9016cabf39510a18a3dd2852924b6dd72e.camel@uajain.com>","References":"<20200526032635.13599-1-laurent.pinchart@ideasonboard.com>\n\t<fdfaee9016cabf39510a18a3dd2852924b6dd72e.camel@uajain.com>","Content-Type":"text/plain; charset=us-ascii","Mime-Version":"1.0","X-SG-EID":"1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPcGsFXrTC3nkaVUz7y/MXE3boyfDLiHCdvtrq82cR6AC4VSaQ4HoHkBpHgmJ4+uF1bU01Cq0XCSjrPulAliYJpIkzA+QmY5AG2Ws99ar8pideC2fberWbPQTeAHWoX8kNaa2C3bZcIWPW3DG62cBRWOJhybMBzsBuIFVyKOorUYQdFGEzbXnJ1K3DJRuOxbGFc8Z33KFZlSFvwZ6rLcqwCeA==","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH] libcamera: Declare functions before\n\tvariables in class definitions","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>","X-List-Received-Date":"Tue, 26 May 2020 06:21:39 -0000"}},{"id":4962,"web_url":"https://patchwork.libcamera.org/comment/4962/","msgid":"<20200602112923.GA6151@pendragon.ideasonboard.com>","date":"2020-06-02T11:29:23","subject":"Re: [libcamera-devel] [PATCH] libcamera: Declare functions before\n\tvariables in class definitions","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Umang,\n\nOn Tue, May 26, 2020 at 05:24:52AM +0000, Umang Jain wrote:\n> On Tue, 2020-05-26 at 06:26 +0300, Laurent Pinchart wrote:\n> > The preferred coding style in libcamera is to declare private functions\n> > before private variables in class definitions. This rule isn't followed\n> > by some of the internal classes. Update them accordingly.\n> > \n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  .../internal/device_enumerator_udev.h         | 16 ++++++------\n> >  .../internal/event_dispatcher_poll.h          | 12 ++++-----\n> >  include/libcamera/internal/ipa_manager.h      |  4 +--\n> >  include/libcamera/internal/ipa_module.h       |  4 +--\n> >  include/libcamera/internal/media_device.h     | 26 +++++++++------\n> > ----\n> >  include/libcamera/internal/media_object.h     |  4 +--\n> >  6 files changed, 33 insertions(+), 33 deletions(-)\n>\n> I spotted one more place that is not included in this patch, which\n> is : include/libcamera/ipa_context_wrapper.h\n\nIn that file, we have\n\nprivate:\n        static void queue_frame_action(void *ctx, unsigned int frame,\n                                       struct ipa_operation_data &data);\n        static const struct ipa_callback_ops callbacks_;\n\n        void doQueueFrameAction(unsigned int frame,\n                                const IPAOperationData &data);\n\n        struct ipa_context *ctx_;\n        IPAInterface *intf_;\n\n        ControlSerializer serializer_;\n\nI'm not sure if we should keep the two static members together, or\nstrictly group all data after the functions. I went for the former as\nit's a grey area, but if you think the latter is better, I'll change it.\n\n> Apart from that:\n> Reviewed-by: Umang Jain <email@uajain.com>\n>\n> > diff --git a/include/libcamera/internal/device_enumerator_udev.h\n> > b/include/libcamera/internal/device_enumerator_udev.h\n> > index fdaa20968ef0..10d17ed2abac 100644\n> > --- a/include/libcamera/internal/device_enumerator_udev.h\n> > +++ b/include/libcamera/internal/device_enumerator_udev.h\n> > @@ -36,10 +36,6 @@ public:\n> >  \tint enumerate() final;\n> >  \n> >  private:\n> > -\tstruct udev *udev_;\n> > -\tstruct udev_monitor *monitor_;\n> > -\tEventNotifier *notifier_;\n> > -\n> >  \tusing DependencyMap = std::map<dev_t, std::list<MediaEntity\n> > *>>;\n> >  \n> >  \tstruct MediaDeviceDeps {\n> > @@ -58,16 +54,20 @@ private:\n> >  \t\tDependencyMap deps_;\n> >  \t};\n> >  \n> > -\tstd::set<dev_t> orphans_;\n> > -\tstd::list<MediaDeviceDeps> pending_;\n> > -\tstd::map<dev_t, MediaDeviceDeps *> devMap_;\n> > -\n> >  \tint addUdevDevice(struct udev_device *dev);\n> >  \tint populateMediaDevice(MediaDevice *media, DependencyMap\n> > *deps);\n> >  \tstd::string lookupDeviceNode(dev_t devnum);\n> >  \n> >  \tint addV4L2Device(dev_t devnum);\n> >  \tvoid udevNotify(EventNotifier *notifier);\n> > +\n> > +\tstruct udev *udev_;\n> > +\tstruct udev_monitor *monitor_;\n> > +\tEventNotifier *notifier_;\n> > +\n> > +\tstd::set<dev_t> orphans_;\n> > +\tstd::list<MediaDeviceDeps> pending_;\n> > +\tstd::map<dev_t, MediaDeviceDeps *> devMap_;\n> >  };\n> >  \n> >  } /* namespace libcamera */\n> > diff --git a/include/libcamera/internal/event_dispatcher_poll.h\n> > b/include/libcamera/internal/event_dispatcher_poll.h\n> > index 1f0738617425..3c9099660c4d 100644\n> > --- a/include/libcamera/internal/event_dispatcher_poll.h\n> > +++ b/include/libcamera/internal/event_dispatcher_poll.h\n> > @@ -41,16 +41,16 @@ private:\n> >  \t\tEventNotifier *notifiers[3];\n> >  \t};\n> >  \n> > -\tstd::map<int, EventNotifierSetPoll> notifiers_;\n> > -\tstd::list<Timer *> timers_;\n> > -\tint eventfd_;\n> > -\n> > -\tbool processingEvents_;\n> > -\n> >  \tint poll(std::vector<struct pollfd> *pollfds);\n> >  \tvoid processInterrupt(const struct pollfd &pfd);\n> >  \tvoid processNotifiers(const std::vector<struct pollfd>\n> > &pollfds);\n> >  \tvoid processTimers();\n> > +\n> > +\tstd::map<int, EventNotifierSetPoll> notifiers_;\n> > +\tstd::list<Timer *> timers_;\n> > +\tint eventfd_;\n> > +\n> > +\tbool processingEvents_;\n> >  };\n> >  \n> >  } /* namespace libcamera */\n> > diff --git a/include/libcamera/internal/ipa_manager.h\n> > b/include/libcamera/internal/ipa_manager.h\n> > index 2412d75746ac..16d742918cf2 100644\n> > --- a/include/libcamera/internal/ipa_manager.h\n> > +++ b/include/libcamera/internal/ipa_manager.h\n> > @@ -29,8 +29,6 @@ public:\n> >  \t\t\t\t\t    uint32_t minVersion);\n> >  \n> >  private:\n> > -\tstd::vector<IPAModule *> modules_;\n> > -\n> >  \tIPAManager();\n> >  \t~IPAManager();\n> >  \n> > @@ -40,6 +38,8 @@ private:\n> >  \n> >  \tbool isSignatureValid(IPAModule *ipa) const;\n> >  \n> > +\tstd::vector<IPAModule *> modules_;\n> > +\n> >  #if HAVE_IPA_PUBKEY\n> >  \tstatic const uint8_t publicKeyData_[];\n> >  \tstatic const PubKey pubKey_;\n> > diff --git a/include/libcamera/internal/ipa_module.h\n> > b/include/libcamera/internal/ipa_module.h\n> > index 5b54cb31a48a..788e31d8bf03 100644\n> > --- a/include/libcamera/internal/ipa_module.h\n> > +++ b/include/libcamera/internal/ipa_module.h\n> > @@ -42,6 +42,8 @@ protected:\n> >  \tstd::string logPrefix() const override;\n> >  \n> >  private:\n> > +\tint loadIPAModuleInfo();\n> > +\n> >  \tstruct IPAModuleInfo info_;\n> >  \tstd::vector<uint8_t> signature_;\n> >  \n> > @@ -52,8 +54,6 @@ private:\n> >  \tvoid *dlHandle_;\n> >  \ttypedef struct ipa_context *(*IPAIntfFactory)(void);\n> >  \tIPAIntfFactory ipaCreate_;\n> > -\n> > -\tint loadIPAModuleInfo();\n> >  };\n> >  \n> >  } /* namespace libcamera */\n> > diff --git a/include/libcamera/internal/media_device.h\n> > b/include/libcamera/internal/media_device.h\n> > index 9fe76c514b17..19af059d9291 100644\n> > --- a/include/libcamera/internal/media_device.h\n> > +++ b/include/libcamera/internal/media_device.h\n> > @@ -58,26 +58,13 @@ protected:\n> >  \tstd::string logPrefix() const;\n> >  \n> >  private:\n> > -\tstd::string driver_;\n> > -\tstd::string deviceNode_;\n> > -\tstd::string model_;\n> > -\tunsigned int version_;\n> > -\n> > -\tint fd_;\n> > -\tbool valid_;\n> > -\tbool acquired_;\n> > -\tbool lockOwner_;\n> > -\n> >  \tint open();\n> >  \tvoid close();\n> >  \n> > -\tstd::map<unsigned int, MediaObject *> objects_;\n> >  \tMediaObject *object(unsigned int id);\n> >  \tbool addObject(MediaObject *object);\n> >  \tvoid clear();\n> >  \n> > -\tstd::vector<MediaEntity *> entities_;\n> > -\n> >  \tstruct media_v2_interface *findInterface(const struct\n> > media_v2_topology &topology,\n> >  \t\t\t\t\t\t unsigned int\n> > entityId);\n> >  \tbool populateEntities(const struct media_v2_topology\n> > &topology);\n> > @@ -87,6 +74,19 @@ private:\n> >  \n> >  \tfriend int MediaLink::setEnabled(bool enable);\n> >  \tint setupLink(const MediaLink *link, unsigned int flags);\n> > +\n> > +\tstd::string driver_;\n> > +\tstd::string deviceNode_;\n> > +\tstd::string model_;\n> > +\tunsigned int version_;\n> > +\n> > +\tint fd_;\n> > +\tbool valid_;\n> > +\tbool acquired_;\n> > +\tbool lockOwner_;\n> > +\n> > +\tstd::map<unsigned int, MediaObject *> objects_;\n> > +\tstd::vector<MediaEntity *> entities_;\n> >  };\n> >  \n> >  } /* namespace libcamera */\n> > diff --git a/include/libcamera/internal/media_object.h\n> > b/include/libcamera/internal/media_object.h\n> > index 748eafdc880b..e8f2f27ce99e 100644\n> > --- a/include/libcamera/internal/media_object.h\n> > +++ b/include/libcamera/internal/media_object.h\n> > @@ -107,6 +107,8 @@ private:\n> >  \tMediaEntity(const MediaEntity &) = delete;\n> >  \t~MediaEntity();\n> >  \n> > +\tvoid addPad(MediaPad *pad);\n> > +\n> >  \tstd::string name_;\n> >  \tunsigned int function_;\n> >  \tunsigned int flags_;\n> > @@ -115,8 +117,6 @@ private:\n> >  \tunsigned int minor_;\n> >  \n> >  \tstd::vector<MediaPad *> pads_;\n> > -\n> > -\tvoid addPad(MediaPad *pad);\n> >  };\n> >  \n> >  } /* namespace libcamera */","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["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 78DDA603CB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  2 Jun 2020 13:29:39 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E69522A4;\n\tTue,  2 Jun 2020 13:29:38 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"YZhv6sEv\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1591097379;\n\tbh=/agU1X1PuTLVpchqIYPJ1jhK/TsL1UFbVIFntIElfFU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=YZhv6sEvquFRwq5VbIr0Dh5d/UFtuOb59OGKRBZq75BjL9sJU3DoIKhFkIWafkGfD\n\tPWtH2185kVsSszpnR1BueaBuyDeG9UFbELcQCEpZOBRt4w3TlRpsP103wQob5ssnO+\n\tiphL0GN1PSL2JI1dDdAo0ChfpY5yfNlvxRmFT9uQ=","Date":"Tue, 2 Jun 2020 14:29:23 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Umang Jain <email@uajain.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200602112923.GA6151@pendragon.ideasonboard.com>","References":"<20200526032635.13599-1-laurent.pinchart@ideasonboard.com>\n\t<fdfaee9016cabf39510a18a3dd2852924b6dd72e.camel@uajain.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<fdfaee9016cabf39510a18a3dd2852924b6dd72e.camel@uajain.com>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: Declare functions before\n\tvariables in class definitions","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>","X-List-Received-Date":"Tue, 02 Jun 2020 11:29:39 -0000"}},{"id":4971,"web_url":"https://patchwork.libcamera.org/comment/4971/","msgid":"<a3bf3207-261c-ae0a-d5f2-06fa3fb02782@uajain.com>","date":"2020-06-02T15:27:03","subject":"Re: [libcamera-devel] [PATCH] libcamera: Declare functions before\n\tvariables in class definitions","submitter":{"id":1,"url":"https://patchwork.libcamera.org/api/people/1/","name":"Umang Jain","email":"email@uajain.com"},"content":"Hi Laurent,\n\nOn 6/2/20 4:59 PM, Laurent Pinchart wrote:\n> Hi Umang,\n>\n> On Tue, May 26, 2020 at 05:24:52AM +0000, Umang Jain wrote:\n>> On Tue, 2020-05-26 at 06:26 +0300, Laurent Pinchart wrote:\n>>> The preferred coding style in libcamera is to declare private functions\n>>> before private variables in class definitions. This rule isn't followed\n>>> by some of the internal classes. Update them accordingly.\n>>>\n>>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>>> ---\n>>>   .../internal/device_enumerator_udev.h         | 16 ++++++------\n>>>   .../internal/event_dispatcher_poll.h          | 12 ++++-----\n>>>   include/libcamera/internal/ipa_manager.h      |  4 +--\n>>>   include/libcamera/internal/ipa_module.h       |  4 +--\n>>>   include/libcamera/internal/media_device.h     | 26 +++++++++------\n>>> ----\n>>>   include/libcamera/internal/media_object.h     |  4 +--\n>>>   6 files changed, 33 insertions(+), 33 deletions(-)\n>> I spotted one more place that is not included in this patch, which\n>> is : include/libcamera/ipa_context_wrapper.h\n> In that file, we have\n>\n> private:\n>          static void queue_frame_action(void *ctx, unsigned int frame,\n>                                         struct ipa_operation_data &data);\n>          static const struct ipa_callback_ops callbacks_;\n>\n>          void doQueueFrameAction(unsigned int frame,\n>                                  const IPAOperationData &data);\n>\n>          struct ipa_context *ctx_;\n>          IPAInterface *intf_;\n>\n>          ControlSerializer serializer_;\n>\n> I'm not sure if we should keep the two static members together, or\n> strictly group all data after the functions. I went for the former as\n> it's a grey area, but if you think the latter is better, I'll change it.\n\nIndeed a grey area and after some thinking I agree that static members \nshould be kept together,\n\nso this change can be merged as is.\n\nThanks.\n\n>> Apart from that:\n>> Reviewed-by: Umang Jain <email@uajain.com>\n>>\n>>> diff --git a/include/libcamera/internal/device_enumerator_udev.h\n>>> b/include/libcamera/internal/device_enumerator_udev.h\n>>> index fdaa20968ef0..10d17ed2abac 100644\n>>> --- a/include/libcamera/internal/device_enumerator_udev.h\n>>> +++ b/include/libcamera/internal/device_enumerator_udev.h\n>>> @@ -36,10 +36,6 @@ public:\n>>>   \tint enumerate() final;\n>>>   \n>>>   private:\n>>> -\tstruct udev *udev_;\n>>> -\tstruct udev_monitor *monitor_;\n>>> -\tEventNotifier *notifier_;\n>>> -\n>>>   \tusing DependencyMap = std::map<dev_t, std::list<MediaEntity\n>>> *>>;\n>>>   \n>>>   \tstruct MediaDeviceDeps {\n>>> @@ -58,16 +54,20 @@ private:\n>>>   \t\tDependencyMap deps_;\n>>>   \t};\n>>>   \n>>> -\tstd::set<dev_t> orphans_;\n>>> -\tstd::list<MediaDeviceDeps> pending_;\n>>> -\tstd::map<dev_t, MediaDeviceDeps *> devMap_;\n>>> -\n>>>   \tint addUdevDevice(struct udev_device *dev);\n>>>   \tint populateMediaDevice(MediaDevice *media, DependencyMap\n>>> *deps);\n>>>   \tstd::string lookupDeviceNode(dev_t devnum);\n>>>   \n>>>   \tint addV4L2Device(dev_t devnum);\n>>>   \tvoid udevNotify(EventNotifier *notifier);\n>>> +\n>>> +\tstruct udev *udev_;\n>>> +\tstruct udev_monitor *monitor_;\n>>> +\tEventNotifier *notifier_;\n>>> +\n>>> +\tstd::set<dev_t> orphans_;\n>>> +\tstd::list<MediaDeviceDeps> pending_;\n>>> +\tstd::map<dev_t, MediaDeviceDeps *> devMap_;\n>>>   };\n>>>   \n>>>   } /* namespace libcamera */\n>>> diff --git a/include/libcamera/internal/event_dispatcher_poll.h\n>>> b/include/libcamera/internal/event_dispatcher_poll.h\n>>> index 1f0738617425..3c9099660c4d 100644\n>>> --- a/include/libcamera/internal/event_dispatcher_poll.h\n>>> +++ b/include/libcamera/internal/event_dispatcher_poll.h\n>>> @@ -41,16 +41,16 @@ private:\n>>>   \t\tEventNotifier *notifiers[3];\n>>>   \t};\n>>>   \n>>> -\tstd::map<int, EventNotifierSetPoll> notifiers_;\n>>> -\tstd::list<Timer *> timers_;\n>>> -\tint eventfd_;\n>>> -\n>>> -\tbool processingEvents_;\n>>> -\n>>>   \tint poll(std::vector<struct pollfd> *pollfds);\n>>>   \tvoid processInterrupt(const struct pollfd &pfd);\n>>>   \tvoid processNotifiers(const std::vector<struct pollfd>\n>>> &pollfds);\n>>>   \tvoid processTimers();\n>>> +\n>>> +\tstd::map<int, EventNotifierSetPoll> notifiers_;\n>>> +\tstd::list<Timer *> timers_;\n>>> +\tint eventfd_;\n>>> +\n>>> +\tbool processingEvents_;\n>>>   };\n>>>   \n>>>   } /* namespace libcamera */\n>>> diff --git a/include/libcamera/internal/ipa_manager.h\n>>> b/include/libcamera/internal/ipa_manager.h\n>>> index 2412d75746ac..16d742918cf2 100644\n>>> --- a/include/libcamera/internal/ipa_manager.h\n>>> +++ b/include/libcamera/internal/ipa_manager.h\n>>> @@ -29,8 +29,6 @@ public:\n>>>   \t\t\t\t\t    uint32_t minVersion);\n>>>   \n>>>   private:\n>>> -\tstd::vector<IPAModule *> modules_;\n>>> -\n>>>   \tIPAManager();\n>>>   \t~IPAManager();\n>>>   \n>>> @@ -40,6 +38,8 @@ private:\n>>>   \n>>>   \tbool isSignatureValid(IPAModule *ipa) const;\n>>>   \n>>> +\tstd::vector<IPAModule *> modules_;\n>>> +\n>>>   #if HAVE_IPA_PUBKEY\n>>>   \tstatic const uint8_t publicKeyData_[];\n>>>   \tstatic const PubKey pubKey_;\n>>> diff --git a/include/libcamera/internal/ipa_module.h\n>>> b/include/libcamera/internal/ipa_module.h\n>>> index 5b54cb31a48a..788e31d8bf03 100644\n>>> --- a/include/libcamera/internal/ipa_module.h\n>>> +++ b/include/libcamera/internal/ipa_module.h\n>>> @@ -42,6 +42,8 @@ protected:\n>>>   \tstd::string logPrefix() const override;\n>>>   \n>>>   private:\n>>> +\tint loadIPAModuleInfo();\n>>> +\n>>>   \tstruct IPAModuleInfo info_;\n>>>   \tstd::vector<uint8_t> signature_;\n>>>   \n>>> @@ -52,8 +54,6 @@ private:\n>>>   \tvoid *dlHandle_;\n>>>   \ttypedef struct ipa_context *(*IPAIntfFactory)(void);\n>>>   \tIPAIntfFactory ipaCreate_;\n>>> -\n>>> -\tint loadIPAModuleInfo();\n>>>   };\n>>>   \n>>>   } /* namespace libcamera */\n>>> diff --git a/include/libcamera/internal/media_device.h\n>>> b/include/libcamera/internal/media_device.h\n>>> index 9fe76c514b17..19af059d9291 100644\n>>> --- a/include/libcamera/internal/media_device.h\n>>> +++ b/include/libcamera/internal/media_device.h\n>>> @@ -58,26 +58,13 @@ protected:\n>>>   \tstd::string logPrefix() const;\n>>>   \n>>>   private:\n>>> -\tstd::string driver_;\n>>> -\tstd::string deviceNode_;\n>>> -\tstd::string model_;\n>>> -\tunsigned int version_;\n>>> -\n>>> -\tint fd_;\n>>> -\tbool valid_;\n>>> -\tbool acquired_;\n>>> -\tbool lockOwner_;\n>>> -\n>>>   \tint open();\n>>>   \tvoid close();\n>>>   \n>>> -\tstd::map<unsigned int, MediaObject *> objects_;\n>>>   \tMediaObject *object(unsigned int id);\n>>>   \tbool addObject(MediaObject *object);\n>>>   \tvoid clear();\n>>>   \n>>> -\tstd::vector<MediaEntity *> entities_;\n>>> -\n>>>   \tstruct media_v2_interface *findInterface(const struct\n>>> media_v2_topology &topology,\n>>>   \t\t\t\t\t\t unsigned int\n>>> entityId);\n>>>   \tbool populateEntities(const struct media_v2_topology\n>>> &topology);\n>>> @@ -87,6 +74,19 @@ private:\n>>>   \n>>>   \tfriend int MediaLink::setEnabled(bool enable);\n>>>   \tint setupLink(const MediaLink *link, unsigned int flags);\n>>> +\n>>> +\tstd::string driver_;\n>>> +\tstd::string deviceNode_;\n>>> +\tstd::string model_;\n>>> +\tunsigned int version_;\n>>> +\n>>> +\tint fd_;\n>>> +\tbool valid_;\n>>> +\tbool acquired_;\n>>> +\tbool lockOwner_;\n>>> +\n>>> +\tstd::map<unsigned int, MediaObject *> objects_;\n>>> +\tstd::vector<MediaEntity *> entities_;\n>>>   };\n>>>   \n>>>   } /* namespace libcamera */\n>>> diff --git a/include/libcamera/internal/media_object.h\n>>> b/include/libcamera/internal/media_object.h\n>>> index 748eafdc880b..e8f2f27ce99e 100644\n>>> --- a/include/libcamera/internal/media_object.h\n>>> +++ b/include/libcamera/internal/media_object.h\n>>> @@ -107,6 +107,8 @@ private:\n>>>   \tMediaEntity(const MediaEntity &) = delete;\n>>>   \t~MediaEntity();\n>>>   \n>>> +\tvoid addPad(MediaPad *pad);\n>>> +\n>>>   \tstd::string name_;\n>>>   \tunsigned int function_;\n>>>   \tunsigned int flags_;\n>>> @@ -115,8 +117,6 @@ private:\n>>>   \tunsigned int minor_;\n>>>   \n>>>   \tstd::vector<MediaPad *> pads_;\n>>> -\n>>> -\tvoid addPad(MediaPad *pad);\n>>>   };\n>>>   \n>>>   } /* namespace libcamera */","headers":{"Return-Path":"<bounces+15657259-5c31-libcamera-devel=lists.libcamera.org@em7280.uajain.com>","Received":["from o1.f.az.sendgrid.net (o1.f.az.sendgrid.net [208.117.55.132])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CD2F361012\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  2 Jun 2020 17:27:05 +0200 (CEST)","by filterdrecv-p3mdw1-6dbfd75bfd-64c6f with SMTP id\n\tfilterdrecv-p3mdw1-6dbfd75bfd-64c6f-19-5ED66FC7-32\n\t2020-06-02 15:27:03.322537573 +0000 UTC m=+5926779.945816599","from mail.uajain.com (unknown)\n\tby ismtpd0023p1iad2.sendgrid.net (SG) with ESMTP\n\tid s_e5lCXsSv2RG9fRw2KZCg Tue, 02 Jun 2020 15:27:02.842 +0000 (UTC)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=uajain.com\n\theader.i=@uajain.com header.b=\"reOe2mA6\"; \n\tdkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com;\n\th=subject:references:from:mime-version:in-reply-to:to:cc:content-type:\n\tcontent-transfer-encoding;\n\ts=s1; bh=p3+8ZI2IXJlo8sYmy7l0VOlULggLcQhWaanQKd0+Kvg=;\n\tb=reOe2mA6zzkJQyg1RxJyoDvD153h9fGsG0XpW1Ab284mJ+6+KPltICTmDayUkx4I7nrr\n\t8yiGAsiRnw/tGPXhb/bqFBxO61jkIYV4yofH1f1UukC2twf6iCd7v7UK8CsVckFkxozjkd\n\t8a2xw71UFPXlTiLcTVUr12eNSZkERdNwA=","References":"<20200526032635.13599-1-laurent.pinchart@ideasonboard.com>\n\t<fdfaee9016cabf39510a18a3dd2852924b6dd72e.camel@uajain.com>\n\t<20200602112923.GA6151@pendragon.ideasonboard.com>","From":"Umang Jain <email@uajain.com>","Message-ID":"<a3bf3207-261c-ae0a-d5f2-06fa3fb02782@uajain.com>","Date":"Tue, 02 Jun 2020 15:27:03 +0000 (UTC)","Mime-Version":"1.0","In-Reply-To":"<20200602112923.GA6151@pendragon.ideasonboard.com>","X-SG-EID":"1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPcpFdq5YgiOsiT/6hp/evDR1juOzOidsl8h/fJtvSWDFTcW2K9rcs7ZW901cRSwHaI6SdMlzP1mh07B7MocOiDwkWRXvU5G4URj1K3bMuYjcmJa2sS5kZdFT9L1XZcaCLF1kO70PqlhVQjF3842QS4KvUyO4C4rLzHoRjIIQYSWB0joKoNHqx7OCPh/hxgE5XJgYsg1pzg1KxKykZUg95LzQ==","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=us-ascii; format=flowed","Content-Transfer-Encoding":"7bit","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [PATCH] libcamera: Declare functions before\n\tvariables in class definitions","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>","X-List-Received-Date":"Tue, 02 Jun 2020 15:27:06 -0000"}}]