Re: [PATCH i-g-t 3/3] lib: Reduce dependency on glib

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 29, 2017 at 03:09:02PM +0300, Arkadiusz Hiler wrote:
> On Fri, Sep 29, 2017 at 01:51:59PM +0300, Petri Latvala wrote:
> > In commit ebd6eb69f57b ("Make igtrc configuration common, with
> > configurable suspend/resume delay") .igtrc handling was moved to
> > igt_core from igt_chamelium. That made everything in IGT depend on
> > GLIB by accident.
> > 
> > In short, igt_core.h declared a variable of type GKeyFile*, requiring
> > glib.h. Everything that tried to #include igt_core.h required glib.h
> > to be available, by use of GLIB_CFLAGS. This "worked" so far because
> > CAIRO_CFLAGS contained GLIB_CFLAGS.
> > 
> > As the variable is only used by other stuff in lib/, stuff it in its
> > own header file to leave igt_core.h without a dependency to glib.h.
> > 
> > Also add a couple of missing #ifdef HAVE_GLIBs around.
> > 
> > Reported-by: Felipe De Jesus Ruiz Garcia <felipe.de.jesus.ruiz.garcia@xxxxxxxxx>
> > Signed-off-by: Petri Latvala <petri.latvala@xxxxxxxxx>
> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@xxxxxxxxx>
> 
> The whole igtrc implementation has plenty of other issues (using asserts
> in a wrong scope, etc).
> 
> I have a bigger rework on my TODO list...

Imo biggest is inversion of control, the core igtrc does all the parsing
for all the other bits in igt, which means we leak all the submodule stuff
into igt_core.c. Which isn't cool.

Is there a JIRA or similar for this already where I could bikeshed?
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux