Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2725152pxj; Mon, 14 Jun 2021 05:53:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsPeQ6wVoR+fBCBphkHxWDInkgmwjVT5gz7QxTv9EmouIKm/ucz4XBy53/mmOvcR/k7Sgj X-Received: by 2002:a17:906:3ed0:: with SMTP id d16mr14649553ejj.16.1623675201588; Mon, 14 Jun 2021 05:53:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623675201; cv=none; d=google.com; s=arc-20160816; b=Jtz0g5PE/BDdVmr+ZnkNcVqiBvZntarH5GH/uhLSJZ3gHRG2pVp4aX6EhhRCZ+ZMkw CGkQ40i1nSvJ/bAcHMb38prKiMXEeavTDrnL6dsvnNWK7PDyHh19YniU7gUPZLPYBSvN WOAEPAyrc4WVKKZaL1LwHhUCG8wQ86A5DW7kztQd4W1nosskw41QGr91X3rJuN1opt80 1oW1XqYsl24ah10nrBLvHr/U/HepC859iPuV7tSsBrMbdMQT0kUtSnRZRP5EYDAgyWXj xBCpMNsrn0P+CB/ZUCdZJnWrmi76J8oVH0OFT2KL20VywdDBQP9LBAEmPA8sa/ATeIwT ROyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YPfSvpsrFK5QAQOSYdktX3s0afhjmdkSrPAJ1lT6RVo=; b=haSqFjdAtkbbAoXQjzESh19Oc0HsOrk9WHbCbRYsdjwrmTffKaaMSDdGM5uT9b9MUY SFRsJQYRL+NrXnAl1nxh3OS28gA2t0zHJtMFKSDFG08YUWBPDLCrE5CprIlDLo44ETrQ oQh/g77ZuHhqrpHaFEelp75tHcQl2STo/8wu2Q2jE27vauSoY2pqFwilutG0M1sPuMK/ WzI/+OALZ/xZI1aqsvOauAP2LkfDDtXSz1WKC5rU5r77rMOhLLaKvyCgUJ4w7XhDbeTB IhXRHjatVg94g03mw8Xhh7+RyZ1HRIPiTyN9vJ1ZD2UsaiCU5BL0nVh7hrZ8Z8eZYTUu 76ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="A/92ucGv"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u7si3099851eju.463.2021.06.14.05.52.59; Mon, 14 Jun 2021 05:53:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="A/92ucGv"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233803AbhFNMxU (ORCPT + 99 others); Mon, 14 Jun 2021 08:53:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:44008 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233732AbhFNMxK (ORCPT ); Mon, 14 Jun 2021 08:53:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 96D6C613B2; Mon, 14 Jun 2021 12:51:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623675067; bh=dUzkPm200JwsFxSk18CwnjXS1TMdE3txsfIeFT3Ecg0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A/92ucGvdJ6Q5KuO9yosPLdUlFeqVrvxAmoKqMK/q96i4c0//ntVH7w7SPMR2zxKP 0ML1DTx/oAUF56fVhPw/2iHhH/+voGWkAs3QdS7Lzkkql14yemUIbXbFEpbZxRuGvL a2MC5+ZkZuxiyBQCws3hDr2tJZhOYMkhPLCDJhVN6e7MvZH7hvCZ4M33stvD76inFd 8GpxT2X9EIK8z4CSK4ZDt0eIz3vviW5yAXIC2dNqojfvPfzUHsRTH1UbJS9A0UR/1l YQZx/f5oRJf6xD9R2wJbEcWy0IH4voLzFoI+gp2Jz8Ac34oC5K3J1gIB8P2MkptrUm JQcmCBSBdpWqQ== From: Oded Gabbay To: linux-kernel@vger.kernel.org Cc: Koby Elbaz Subject: [PATCH 2/9] habanalabs: zero complex structures using memset Date: Mon, 14 Jun 2021 15:50:53 +0300 Message-Id: <20210614125100.17627-2-ogabbay@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210614125100.17627-1-ogabbay@kernel.org> References: <20210614125100.17627-1-ogabbay@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Koby Elbaz fix the following sparse warnings: 'warning: Using plain integer as NULL pointer' 'warning: missing braces around initializer' Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/firmware_if.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/misc/habanalabs/common/firmware_if.c b/drivers/misc/habanalabs/common/firmware_if.c index 14e70422af25..d5d0db7fd6ef 100644 --- a/drivers/misc/habanalabs/common/firmware_if.c +++ b/drivers/misc/habanalabs/common/firmware_if.c @@ -392,10 +392,11 @@ void hl_fw_cpu_accessible_dma_pool_free(struct hl_device *hdev, size_t size, int hl_fw_send_heartbeat(struct hl_device *hdev) { - struct cpucp_packet hb_pkt = {0}; + struct cpucp_packet hb_pkt; u64 result; int rc; + memset(&hb_pkt, 0, sizeof(hb_pkt)); hb_pkt.ctl = cpu_to_le32(CPUCP_PACKET_TEST << CPUCP_PKT_CTL_OPCODE_SHIFT); hb_pkt.value = cpu_to_le64(CPUCP_PACKET_FENCE_VAL); -- 2.25.1