Skip to contentSkip to conversation

habanalabs: Remove unused parse_cnt variable

PATCH Applied Tomer Tayar 2 participants 2 messages Feb 25, 2020 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 habanalabs: Remove unused parse_cnt variable

The "parse_cnt" variable is incremented while validating the CS chunks, but it is actually not being used.

---
 drivers/misc/habanalabs/command_submission.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/misc/habanalabs/command_submission.c +2 -2
index 73ef0f9d758a..409276b6374d 100644
@@ -509,7 +509,7 @@ static int _hl_cs_ioctl(struct hl_fpriv *hpriv, void __user *chunks,
 	struct hl_cb *cb;
 	bool int_queues_only = true;
 	u32 size_to_copy;
-	int rc, i, parse_cnt;
+	int rc, i;
 
 	*cs_seq = ULLONG_MAX;
 
@@ -549,7 +549,7 @@ static int _hl_cs_ioctl(struct hl_fpriv *hpriv, void __user *chunks,
 	hl_debugfs_add_cs(cs);
 
 	/* Validate ALL the CS chunks before submitting the CS */
-	for (i = 0, parse_cnt = 0 ; i < num_chunks ; i++, parse_cnt++) {
+	for (i = 0 ; i < num_chunks ; i++) {
 		struct hl_cs_chunk *chunk = &cs_chunk_array[i];
 		enum hl_queue_type queue_type;
 		bool is_kernel_allocated_cb;
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1 Applied
#1 lore raw
Quoted 32 lines · Tomer Tayar

The "parse_cnt" variable is incremented while validating the CS chunks, but it is actually not being used.

---
 drivers/misc/habanalabs/command_submission.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/misc/habanalabs/command_submission.c +2 -3
index 73ef0f9d758a..409276b6374d 100644
@@ -509,7 +509,7 @@ static int _hl_cs_ioctl(struct hl_fpriv *hpriv, void __user *chunks,
        struct hl_cb *cb;
        bool int_queues_only = true;
        u32 size_to_copy;
-       int rc, i, parse_cnt;
+       int rc, i;
 
        *cs_seq = ULLONG_MAX;
 
@@ -549,7 +549,7 @@ static int _hl_cs_ioctl(struct hl_fpriv *hpriv, void __user *chunks,
        hl_debugfs_add_cs(cs);
 
        /* Validate ALL the CS chunks before submitting the CS */
-       for (i = 0, parse_cnt = 0 ; i < num_chunks ; i++, parse_cnt++) {
+       for (i = 0 ; i < num_chunks ; i++) {
                struct hl_cs_chunk *chunk = &cs_chunk_array[i];
                enum hl_queue_type queue_type;
                bool is_kernel_allocated_cb;
--
Quoted 2 lines

2.17.1

This patch is:

Applied to -next
Thanks,
Oded