From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A974C388F7 for ; Wed, 4 Nov 2020 08:37:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD8512080C for ; Wed, 4 Nov 2020 08:36:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604479019; bh=hLfwGDNHfuENg2N9ZxbZWduhHqDqxbVQYn6uBLhVFf0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=pGeWMfe7+8fVRe+lEni77d1PhR7/WCEa4EAvnQfwxhl0lKSosHb12+ymf80k7EbPX SHUwN0lAaR44cI/ZDOB4wDKFZp5vJvNhV7U8QGRqgxU6T3zejT4UUhJeSpC6ATi0Cp P6fAGO9KFdCI1Ton1eJ6h1ZdKrI3pczhJFXXa5Po= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728710AbgKDIg6 (ORCPT ); Wed, 4 Nov 2020 03:36:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:56406 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728687AbgKDIgo (ORCPT ); Wed, 4 Nov 2020 03:36:44 -0500 Received: from ogabbay-VM.habana-labs.com (unknown [213.57.90.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AA4F1207BB; Wed, 4 Nov 2020 08:36:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604479003; bh=hLfwGDNHfuENg2N9ZxbZWduhHqDqxbVQYn6uBLhVFf0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f0SGpWNCkmk8AoaOZrnIZE651rjT9nK5Um/vCICQbzdyIs2cbZOptBQvE0qJPPJ3B SzMM2MokctIDsyCDrEgMy4ypqEOaCnpRLXJUtBEEnSC5eVAH2sYo25559OBMM7AbUh LVKOfQ/BI+iKkplemG29keBL780uUxH/240G8PMc= From: Oded Gabbay 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 Message-Id: <20201104083630.28402-6-ogabbay@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201104083630.28402-1-ogabbay@kernel.org> References: <20201104083630.28402-1-ogabbay@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.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 --- 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