diff mbox series

[1/3] accel/habanalabs: remove pdev check on idle check

Message ID 20230612120733.3079507-1-ogabbay@kernel.org (mailing list archive)
State New, archived
Headers show
Series [1/3] accel/habanalabs: remove pdev check on idle check | expand

Commit Message

Oded Gabbay June 12, 2023, 12:07 p.m. UTC
Our simulator supports idle check so no need anymore to check if pdev
exists.

Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
---
 drivers/accel/habanalabs/common/device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ofir Bitton June 13, 2023, 7:54 a.m. UTC | #1
On 12/06/2023 15:07, Oded Gabbay wrote:

Our simulator supports idle check so no need anymore to check if pdev
exists.

Signed-off-by: Oded Gabbay <ogabbay@kernel.org><mailto:ogabbay@kernel.org>
---
 drivers/accel/habanalabs/common/device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/accel/habanalabs/common/device.c b/drivers/accel/habanalabs/common/device.c
index 0d02f1f7b994..5e61761b8c11 100644
--- a/drivers/accel/habanalabs/common/device.c
+++ b/drivers/accel/habanalabs/common/device.c
@@ -424,7 +424,7 @@ static void hpriv_release(struct kref *ref)
        /* Check the device idle status and reset if not idle.
         * Skip it if already in reset, or if device is going to be reset in any case.
         */
-       if (!hdev->reset_info.in_reset && !reset_device && hdev->pdev && !hdev->pldm)
+       if (!hdev->reset_info.in_reset && !reset_device && !hdev->pldm)
                device_is_idle = hdev->asic_funcs->is_device_idle(hdev, idle_mask,
                                                        HL_BUSY_ENGINES_MASK_EXT_SIZE, NULL);
        if (!device_is_idle) {


Reviewed-by: Ofir Bitton <obitton@habana.ai<mailto:obitton@habana.ai>>
diff mbox series

Patch

diff --git a/drivers/accel/habanalabs/common/device.c b/drivers/accel/habanalabs/common/device.c
index 0d02f1f7b994..5e61761b8c11 100644
--- a/drivers/accel/habanalabs/common/device.c
+++ b/drivers/accel/habanalabs/common/device.c
@@ -424,7 +424,7 @@  static void hpriv_release(struct kref *ref)
 	/* Check the device idle status and reset if not idle.
 	 * Skip it if already in reset, or if device is going to be reset in any case.
 	 */
-	if (!hdev->reset_info.in_reset && !reset_device && hdev->pdev && !hdev->pldm)
+	if (!hdev->reset_info.in_reset && !reset_device && !hdev->pldm)
 		device_is_idle = hdev->asic_funcs->is_device_idle(hdev, idle_mask,
 							HL_BUSY_ENGINES_MASK_EXT_SIZE, NULL);
 	if (!device_is_idle) {