habanalabs: don't declare tmp twice in same function
authorOded Gabbay <ogabbay@kernel.org>
Mon, 4 Jul 2022 08:51:55 +0000 (11:51 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Tue, 12 Jul 2022 06:09:29 +0000 (09:09 +0300)
tmp is declared in the scope of the function cs_do_release() and
inside a block inside that function.

Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/command_submission.c

index eb5f1ae..941f1ff 100644 (file)
@@ -718,9 +718,9 @@ static void cs_do_release(struct kref *ref)
                 * staged submission
                 */
                if (cs->staged_last) {
-                       struct hl_cs *staged_cs, *tmp;
+                       struct hl_cs *staged_cs, *tmp_cs;
 
-                       list_for_each_entry_safe(staged_cs, tmp,
+                       list_for_each_entry_safe(staged_cs, tmp_cs,
                                        &cs->staged_cs_node, staged_cs_node)
                                staged_cs_put(hdev, staged_cs);
                }