Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp968287pxp; Wed, 16 Mar 2022 22:58:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwC68ep0TXHMc45xDPeE/AMAAQdV/yqMzocndFhtXunjIDEeB8tfxeUd8QcdOKWTvDj9v/X X-Received: by 2002:a17:902:b113:b0:153:2251:c1b0 with SMTP id q19-20020a170902b11300b001532251c1b0mr3473010plr.44.1647496717055; Wed, 16 Mar 2022 22:58:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647496717; cv=none; d=google.com; s=arc-20160816; b=NLMkh/JwIfBJTUAOaZXkNoDQ0XBsDfUwA2W354oj+8I8ryWntb5b6MWYL9pMVE/NQU 7/aRiE4aw618O/zVqnsLZDpfaD5/7wNFZb8LN0q5Cwty2AMQwc2o961k1yURJ4/7hoYh CCKwnhLC/To86soYW0WYu//72A1YZa8RhRmTBhAy5awtgRxfvNMGgeZScu7xYghhen6r 6yuFNkszZA4kLKFTH72S+mctBEfBapwrJef7QZGV+VUpSjTnocF6g9/h3FxP/y8m7Qxm trrZ2B4JA0zmNdbeL8JG1GhNOnQo9gC+uEZ1GvidoaE/TgafyfJ+ymO0nNSKVK0wDDqf BkQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=n1xTEBsxqVy4cy4w/9nxgJG4+u/XTiw/rnwByhAaNGs=; b=PE88vQ6rt0hP0l479oK99aFZ806tfQNr8KHXKs1gMirVag5nKl3AbelcX2OPS4du13 5xlZPzPAv/DuAvvSBfJ7VSJ0yd07/v2/nWkoFArquzxxwgiAWg3a/5o2LTr+Wkg0SNaj wx7qao6m/UGey9ZFWvkeGk0sZi5D/STuysfvvy1U6g7tIYQBfmZ8+/1/HCddxLbsfx0t hyityO9x14WsMuTu1KkSF5JW0N1Vy4v9El17gq2VsZfQhT03inA4sFb39DPInRD/AFw6 64xgjCCXLAMW7Yu6+ZgChLd2Z2Bq+5qGq16Lry5o3KBpcFAgKljrU7vxfiR6pp5E1cJM QR0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="U/Gaevzz"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id p14-20020a63740e000000b003816043efeasi1207205pgc.479.2022.03.16.22.58.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 22:58:37 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="U/Gaevzz"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4587A152818; Wed, 16 Mar 2022 21:54:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349950AbiCOQRI (ORCPT + 99 others); Tue, 15 Mar 2022 12:17:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240489AbiCOQRH (ORCPT ); Tue, 15 Mar 2022 12:17:07 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AECA749CA9; Tue, 15 Mar 2022 09:15:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647360955; x=1678896955; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=2GljXTe3wNrzf4qT4Ab198zPDt4+ZO0/lR6hJ/aDYaw=; b=U/Gaevzzq5Mxys1ay4tvV/Tvc3E81tRaYw0pqQbqjyeyQwTB8K3Kl12S 8KfpEYuJkTbp2xzf29K0lauWXGAXtSnilDFoocIInhByGCPWQ5hbyFLvu 2M3hhRodNOgi9sxcSSDXVmWwNg5CnD9zqxUc0T48epQolhin6rMlCQ1FW XfHTLmSSk3h6WMRZS89wPwQExu4H9G8pdojxaCYQ9l/EWe/FOEZ68Yd8H DJxiJucRdifRTxm6Y9ez5Oa8/7Nr+5jnI6Io6pl28Q5yv2CzHcwQVG4nW GMoHUEKCt5ucwkUFIEN2/Eu2QugWKRkCWWIrrECF74V3VGFMj2p1GUkra w==; X-IronPort-AV: E=McAfee;i="6200,9189,10286"; a="256074638" X-IronPort-AV: E=Sophos;i="5.90,184,1643702400"; d="scan'208";a="256074638" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2022 09:15:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,184,1643702400"; d="scan'208";a="556997948" Received: from yilunxu-optiplex-7050.sh.intel.com (HELO localhost) ([10.239.159.135]) by orsmga008.jf.intel.com with ESMTP; 15 Mar 2022 09:15:53 -0700 Date: Wed, 16 Mar 2022 00:08:55 +0800 From: Xu Yilun To: Nava kishore Manne Cc: "mdf@kernel.org" , "hao.wu@intel.com" , "trix@redhat.com" , Michal Simek , "linux-fpga@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH 2/6] fpga: zynqmp: Initialized variables before using it Message-ID: <20220315160855.GA121107@yilunxu-OptiPlex-7050> References: <20220308094519.1816649-1-nava.manne@xilinx.com> <20220308094519.1816649-3-nava.manne@xilinx.com> <20220311142814.GA97487@yilunxu-OptiPlex-7050> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 15, 2022 at 11:48:11AM +0000, Nava kishore Manne wrote: > Hi Yilun, > > Thanks for providing the review comments. > Please find my response inline. > > > -----Original Message----- > > From: Xu Yilun > > Sent: Friday, March 11, 2022 7:58 PM > > To: Nava kishore Manne > > Cc: mdf@kernel.org; hao.wu@intel.com; trix@redhat.com; Michal Simek > > ; linux-fpga@vger.kernel.org; linux- > > kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org > > Subject: Re: [PATCH 2/6] fpga: zynqmp: Initialized variables before using it > > > > On Tue, Mar 08, 2022 at 03:15:15PM +0530, Nava kishore Manne wrote: > > > This patch initialized variables with the proper value. > > > Addresses-Coverity: "uninit_use: Using uninitialized value" > > > > > > Signed-off-by: Nava kishore Manne > > > --- > > > drivers/fpga/zynqmp-fpga.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/fpga/zynqmp-fpga.c b/drivers/fpga/zynqmp-fpga.c > > > index c60f20949c47..e931d69819a7 100644 > > > --- a/drivers/fpga/zynqmp-fpga.c > > > +++ b/drivers/fpga/zynqmp-fpga.c > > > @@ -41,7 +41,7 @@ static int zynqmp_fpga_ops_write(struct > > fpga_manager *mgr, > > > const char *buf, size_t size) > > > { > > > struct zynqmp_fpga_priv *priv; > > > - dma_addr_t dma_addr; > > > + dma_addr_t dma_addr = 0; > > > > The first use of this variable is as an output parameter: > > > > kbuf = dma_alloc_coherent(priv->dev, size, &dma_addr, > > GFP_KERNEL); > > > > So I don't think it needs to be initialized as 0. > > > > This issue is found by Coverity Scan, Whether this param is input/output this fix will not impact the actual functionality. > In order to fix the issues reported by the Coverity tool, this fix is needed. I didn't see issues about this piece of code, so I don't think we need the fix just to make the tool happy. Maybe the tool could be improved to help us better. Thanks, Yilun > > Regards, > Navakishore.