[i-g-t, v2, 1/3] lib/igt_kmod: fix check to confirm correct driver unload

Daniele Ceraolo Spurio daniele.ceraolospurio at intel.com
Fri Dec 20 19:13:14 UTC 2024




On 12/20/2024 10:02 AM, Kamil Konieczny wrote:
> On 2024-12-19 at 15:05:15 -0800, Daniele Ceraolo Spurio wrote:
>> The driver variable is a string, so we need to pass it in as a variable
>> for the driver name instead of stringifying it.
>>
>> Fixes: e5edf7ea7 ("lib/igt_kmod: add support for Xe driver")
>> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
>> Cc: Mauro Carvalho Chehab <mchehab at kernel.org>
>> Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
>> Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
>> Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>
> Could it be merged first as an abvious fix?

I don't have merge rights to IGT so I can't merge myself, but I don't 
have anything against this being merged ahead of the other patches.
Note however that I've just posted v3 of the series that should address 
the last remaining comments, so it might be worth waiting and merging it 
all in one go. Either way is fine for me.

Daniele

>
> Regards,
> Kamil
>
>> ---
>>   lib/igt_kmod.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
>> index ed283c14b..d73cb4101 100644
>> --- a/lib/igt_kmod.c
>> +++ b/lib/igt_kmod.c
>> @@ -723,7 +723,7 @@ igt_intel_driver_unload(const char *driver)
>>   	igt_kmod_unload("drm_kms_helper");
>>   	igt_kmod_unload("drm");
>>   
>> -	if (igt_kmod_is_loaded("driver")) {
>> +	if (igt_kmod_is_loaded(driver)) {
>>   		igt_warn("%s.ko still loaded!\n", driver);
>>   		return -EBUSY;
>>   	}



More information about the igt-dev mailing list