[igt-dev] [PATCH i-g-t v2] lib/drmtest: Move open device to separate function

Chris Wilson chris at chris-wilson.co.uk
Fri Aug 31 10:47:19 UTC 2018


Quoting Katarzyna Dec (2018-08-31 11:41:15)
> While working on IGT code and during reviewes I've noticed that
> it could be nice to have function that is opening particular device.
> Let's move out conditions for opening device and rename __open_device
> to __search_and_open() function.
> 
> v2: Refactored open_device even more by getting device name once and
> returning fd for it. (Chris)

You get to remove all the unused is_X_device() as well.
Pass sizeof(name)-1 into __get_drm_device_name();
-Chris


More information about the igt-dev mailing list