public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oded Gabbay <ogabbay@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: SW_Drivers@habana.ai
Subject: [PATCH] habanalabs: initialize variable before use
Date: Wed,  4 Nov 2020 10:36:28 +0200	[thread overview]
Message-ID: <20201104083630.28402-6-ogabbay@kernel.org> (raw)
In-Reply-To: <20201104083630.28402-1-ogabbay@kernel.org>

GCC 7.3.1 20180303 (Red Hat 7.3.1-5) complains that collective_engine_id
might be used uninitialized.

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

diff --git a/drivers/misc/habanalabs/common/command_submission.c b/drivers/misc/habanalabs/common/command_submission.c
index 46c36b385c95..746005f7f991 100644
--- a/drivers/misc/habanalabs/common/command_submission.c
+++ b/drivers/misc/habanalabs/common/command_submission.c
@@ -942,7 +942,7 @@ static int cs_ioctl_signal_wait(struct hl_fpriv *hpriv, enum hl_cs_type cs_type,
 	struct hl_cs_compl *sig_waitcs_cmpl;
 	struct hl_cs *cs;
 	enum hl_queue_type q_type;
-	u32 size_to_copy, q_idx, collective_engine_id;
+	u32 size_to_copy, q_idx, collective_engine_id = 0;
 	u64 signal_seq;
 	int rc;
 
-- 
2.17.1


  parent reply	other threads:[~2020-11-04  8:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04  8:36 [PATCH] habanalabs: advanced FW loading Oded Gabbay
2020-11-04  8:36 ` [PATCH 1/2] habanalabs: fetch security indication from FW Oded Gabbay
2020-11-04  8:36 ` [PATCH] habanalabs: fix cs counters structure Oded Gabbay
2020-11-04  8:36 ` [PATCH] habanalabs/gaudi: monitor device memory usage Oded Gabbay
2020-11-04  8:36 ` [PATCH] habanalabs/gaudi: remove unreachable code Oded Gabbay
2020-11-04  8:36 ` Oded Gabbay [this message]
2020-11-04  8:36 ` [PATCH] habanalabs: make sure cs type is valid in cs_ioctl_signal_wait Oded Gabbay
2020-11-04  8:36 ` [PATCH 2/2] habanalabs/gaudi: add support for FW security Oded Gabbay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201104083630.28402-6-ogabbay@kernel.org \
    --to=ogabbay@kernel.org \
    --cc=SW_Drivers@habana.ai \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox