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

Oded Gabbay ogabbay at kernel.org
Mon May 22 11:34:53 UTC 2023


On Mon, May 22, 2023 at 2:33 PM Dan Carpenter <dan.carpenter at linaro.org> wrote:
>
> 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)?
Sure, np. I'll fix it before pushing it to the branch.
Oded
>
> regards,
> dan carpenter


More information about the dri-devel mailing list