From: Nava kishore Manne <navam@xilinx.com>
To: Xu Yilun <yilun.xu@intel.com>
Cc: "mdf@kernel.org" <mdf@kernel.org>,
"hao.wu@intel.com" <hao.wu@intel.com>,
"trix@redhat.com" <trix@redhat.com>,
Michal Simek <michals@xilinx.com>,
"linux-fpga@vger.kernel.org" <linux-fpga@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: RE: [PATCH 2/6] fpga: zynqmp: Initialized variables before using it
Date: Tue, 22 Mar 2022 06:55:44 +0000 [thread overview]
Message-ID: <SN6PR02MB45765A42BF873BDC02DF210EC2179@SN6PR02MB4576.namprd02.prod.outlook.com> (raw)
In-Reply-To: <20220315160855.GA121107@yilunxu-OptiPlex-7050>
Hi Yilun,
Please find my response inline.
> -----Original Message-----
> From: Xu Yilun <yilun.xu@intel.com>
> Sent: Tuesday, March 15, 2022 9:39 PM
> To: Nava kishore Manne <navam@xilinx.com>
> Cc: mdf@kernel.org; hao.wu@intel.com; trix@redhat.com; Michal Simek
> <michals@xilinx.com>; 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 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 <yilun.xu@intel.com>
> > > Sent: Friday, March 11, 2022 7:58 PM
> > > To: Nava kishore Manne <navam@xilinx.com>
> > > Cc: mdf@kernel.org; hao.wu@intel.com; trix@redhat.com; Michal Simek
> > > <michals@xilinx.com>; 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 <nava.manne@xilinx.com>
> > > > ---
> > > > 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.
>
Agreed, I will drop this patch in v2.
Regards,
Navakishore.
next prev parent reply other threads:[~2022-03-22 6:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-08 9:45 [PATCH 0/6]fpga: fix for coding style and kernel-doc issues Nava kishore Manne
2022-03-08 9:45 ` [PATCH 1/6] fpga: zynq: Fix incorrect variable type Nava kishore Manne
2022-03-08 9:45 ` [PATCH 2/6] fpga: zynqmp: Initialized variables before using it Nava kishore Manne
2022-03-11 14:28 ` Xu Yilun
2022-03-15 11:48 ` Nava kishore Manne
2022-03-15 16:08 ` Xu Yilun
2022-03-22 6:55 ` Nava kishore Manne [this message]
2022-03-08 9:45 ` [PATCH 3/6] fpga: fpga-mgr: fix for coding style issues Nava kishore Manne
2022-03-08 9:45 ` [PATCH 4/6] fpga: fpga-mgr: Add missing kernel-doc description Nava kishore Manne
2022-03-08 21:38 ` Randy Dunlap
2022-03-15 11:51 ` Nava kishore Manne
2022-03-08 9:45 ` [PATCH 5/6] fpga: Use tab instead of spaces for indentation Nava kishore Manne
2022-03-08 9:45 ` [PATCH 6/6] fpga: fpga-region: Add missing kernel-doc description Nava kishore Manne
2022-03-08 21:40 ` Randy Dunlap
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=SN6PR02MB45765A42BF873BDC02DF210EC2179@SN6PR02MB4576.namprd02.prod.outlook.com \
--to=navam@xilinx.com \
--cc=hao.wu@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mdf@kernel.org \
--cc=michals@xilinx.com \
--cc=trix@redhat.com \
--cc=yilun.xu@intel.com \
/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
all inboxes | Powered by JetHome®