Quoting Andi Shyti (2019-03-11 10:30:23) > Hi again, > > I was thinking... > > > +static void bonded(int i915, unsigned int flags) > > +#define CORK 0x1 > > +{ > > + struct class_instance *master_engines; > > ... shall we just make 'struct class_instance' generic in the > uapi? I do not expect every test that uses class and instance to > define its own structure. But this test is defining its own struct ;) > Besides we can avoid a good load of 'offsetof' and make the whole > thing more readable. Maybe stop using uAPI structs for library structs -- it's not a good strategy long term. (We only need the uAPI for interfacing, but for the library we tend to want other details such as mmio_base, name, etc) Using offsetof to define the size is reasonably common practice for variable length arrays (except unless you are paranoid about overflow in every step of the computation). -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx