Re: [PATCH] uacce: add print information if not enable sva
From: Joe Perches
Date: Fri Jun 04 2021 - 03:57:04 EST
On Fri, 2021-06-04 at 15:46 +0800, Kai Ye wrote:
> Add print information necessary if user not enable sva.
[]
> diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c
[]
> @@ -387,15 +387,22 @@ static void uacce_release(struct device *dev)
>
>
> static unsigned int uacce_enable_sva(struct device *parent, unsigned int flags)
> {
> + int ret;
[]
> + ret = iommu_dev_enable_feature(parent, IOMMU_DEV_FEAT_IOPF);
> + if (ret) {
> + dev_err(parent, "failed to enable IOPF feature! ret = %d\n", ret);
Perhaps use %pe, ERR_PTR(ret) to get descriptive error output
> + dev_err(parent, "failed to enable SVA feature! ret = %d\n", ret);
here too