Re: [PATCH 1/4] accel/habanalabs: remove sim code

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

 



Thanks!

On Mon, May 22, 2023 at 02:25:45PM +0300, Oded Gabbay wrote:
> diff --git a/drivers/accel/habanalabs/common/device.c b/drivers/accel/habanalabs/common/device.c
> index cab5a63db8c1..ca15c8d0d042 100644
> --- a/drivers/accel/habanalabs/common/device.c
> +++ b/drivers/accel/habanalabs/common/device.c
> @@ -2328,13 +2328,9 @@ int hl_device_init(struct hl_device *hdev)
>  	hdev->disabled = true;
>  	if (expose_interfaces_on_err)
>  		cdev_sysfs_debugfs_add(hdev);
> -	if (hdev->pdev)
> -		dev_err(&hdev->pdev->dev,
> -			"Failed to initialize hl%d. Device %s is NOT usable !\n",
> -			hdev->cdev_idx, dev_name(&(hdev)->pdev->dev));
> -	else
> -		pr_err("Failed to initialize hl%d. Device %s is NOT usable !\n",
> -			hdev->cdev_idx, dev_name(&(hdev)->pdev->dev));
> +	dev_err(&hdev->pdev->dev,
                 ^^^^^^^^^^^^^^^

> +		"Failed to initialize hl%d. Device %s is NOT usable !\n",
> +		hdev->cdev_idx, dev_name(&(hdev)->pdev->dev));
                                         ^^^^^^^^^^^^^^^^^^^

I hate to be picky, but would it be too much to get rid of the parens
around (hdev)?

regards,
dan carpenter



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux