RE: [PATCH] vfio: platform: ignore missing reset if disabled at module init

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

 



>-----Original Message-----
>From: Tian, Kevin <kevin.tian@xxxxxxxxx>
>Sent: Monday, January 30, 2023 10:06 AM
>To: Tomasz Duszynski <tduszynski@xxxxxxxxxxx>; Eric Auger <eric.auger@xxxxxxxxxx>; Alex Williamson
><alex.williamson@xxxxxxxxxx>; Cornelia Huck <cohuck@xxxxxxxxxx>; Jason Gunthorpe <jgg@xxxxxxxx>;
>open list:VFIO PLATFORM DRIVER <kvm@xxxxxxxxxxxxxxx>; open list <linux-kernel@xxxxxxxxxxxxxxx>
>Cc: Jerin Jacob Kollanukkaran <jerinj@xxxxxxxxxxx>
>Subject: [EXT] RE: [PATCH] vfio: platform: ignore missing reset if disabled at module init
>
>External Email
>
>----------------------------------------------------------------------
>> From: Tomasz Duszynski <tduszynski@xxxxxxxxxxx>
>> Sent: Thursday, January 26, 2023 12:11 AM @@ -653,7 +653,8 @@ int
>> vfio_platform_init_common(struct vfio_platform_device *vdev)
>>  	if (ret && vdev->reset_required)
>>  		dev_err(dev, "No reset function found for device %s\n",
>>  			vdev->name);
>> -	return ret;
>> +
>> +	return vdev->reset_required ? ret : 0;
>>  }
>>  EXPORT_SYMBOL_GPL(vfio_platform_init_common);
>
>It reads slightly better to me as below:
>
>	if (ret & vdev->reset_required) {
>		dev_err(...);
>		return ret;
>	}
>
>	return 0;

Sure no problem. 




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux