[libcamera-devel] [PATCH] libcamera: device_enumerator: Fix include order for internal headers

Laurent Pinchart laurent.pinchart at ideasonboard.com
Sun Jun 27 20:13:24 CEST 2021


Hi Kieran,

On Sun, Jun 27, 2021 at 12:55:19PM +0100, Kieran Bingham wrote:
> On 25/06/2021 23:05, Laurent Pinchart wrote:
> > The device_enumerator_sysfs.h and device_enumerator_udev.h internal
> > headers are not at the correct location. Fix it.
> > 
> > Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> > ---
> >  src/libcamera/device_enumerator.cpp | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/src/libcamera/device_enumerator.cpp b/src/libcamera/device_enumerator.cpp
> > index 1f33faf5e7aa..cfd1e6b22f64 100644
> > --- a/src/libcamera/device_enumerator.cpp
> > +++ b/src/libcamera/device_enumerator.cpp
> > @@ -6,13 +6,13 @@
> >   */
> >  
> >  #include "libcamera/internal/device_enumerator.h"
> > -#include "libcamera/internal/device_enumerator_sysfs.h"
> > -#include "libcamera/internal/device_enumerator_udev.h"
> >  
> >  #include <string.h>
> >  
> >  #include <libcamera/base/log.h>
> >  
> > +#include "libcamera/internal/device_enumerator_sysfs.h"
> > +#include "libcamera/internal/device_enumerator_udev.h"
> 
> I think I remember seeing these fly by, and didn't process them at the
> time, due to the huge churn already.
> 
> There's a .clang-format update that will handle a lot of this on it's
> way, but one issue is that your hunk matcher often can't match the full
> move, as it often sees the changes being made by clang-format as two
> distinct hunks, and will only display one of them. I'm not yet sure what
> to do about that other than ... ignore it for now and consider the
> single hunk as a 'suggestion' that something has changed, rather than
> the 'solution...

Indeed. It would be nice to handle this correctly in checkstyle.py, but
it's a rabbit hole I won't explore just yet.

> Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> 
> >  #include "libcamera/internal/media_device.h"
> >  
> >  /**

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list