From: "Xu, Rosen" <rosen.xu@intel.com>
To: "Huang, Wei" <wei.huang@intel.com>, "dev@dpdk.org" <dev@dpdk.org>,
"Zhang, Qi Z" <qi.z.zhang@intel.com>,
"nipun.gupta@nxp.com" <nipun.gupta@nxp.com>,
"hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
"Zhang, Tianfei" <tianfei.zhang@intel.com>,
"Yigit, Ferruh" <ferruh.yigit@intel.com>
Subject: RE: [PATCH v3] raw/ifpga: initialize scalar variable before using
Date: Mon, 21 Feb 2022 02:46:45 +0000 [thread overview]
Message-ID: <DM6PR11MB42528E2DAD58084FE3C8FDD2893A9@DM6PR11MB4252.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220221022019.303075-1-wei.huang@intel.com>
Hi,
> -----Original Message-----
> From: Huang, Wei <wei.huang@intel.com>
> Sent: Monday, February 21, 2022 10:20
> To: dev@dpdk.org; Xu, Rosen <rosen.xu@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; nipun.gupta@nxp.com; hemant.agrawal@nxp.com
> Cc: stable@dpdk.org; Zhang, Tianfei <tianfei.zhang@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; Huang, Wei <wei.huang@intel.com>
> Subject: [PATCH v3] raw/ifpga: initialize scalar variable before using
>
> Scalar variable sub_brg_bdf may be used uninitialized in function
> ifpga_rawdev_fill_info(). It is initialized now in this fix.
>
> Fixes: 9c006c45d0c5 ("raw/ifpga: scan PCIe BDF device tree")
> Cc: stable@dpdk.org
>
> Signed-off-by: Wei Huang <wei.huang@intel.com>
> ---
> v2: add space after comma to meet coding style requirement
> ---
> v3: refine log
> ---
> drivers/raw/ifpga/ifpga_rawdev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/raw/ifpga/ifpga_rawdev.c
> b/drivers/raw/ifpga/ifpga_rawdev.c
> index b73512d..c133a94 100644
> --- a/drivers/raw/ifpga/ifpga_rawdev.c
> +++ b/drivers/raw/ifpga/ifpga_rawdev.c
> @@ -216,7 +216,7 @@ static int ifpga_rawdev_fill_info(struct ifpga_rawdev
> *ifpga_dev,
> char dir[1024] = "/sys/devices/";
> char *c;
> int ret;
> - char sub_brg_bdf[4][16];
> + char sub_brg_bdf[4][16] = {{0}, {0}, {0}, {0}};
> int point;
> DIR *dp = NULL;
> struct dirent *entry;
> --
> 1.8.3.1
Acked-by: Rosen Xu <rosen.xu@intel.com>
next prev parent reply other threads:[~2022-02-21 2:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-18 3:09 [PATCH v1] " Wei Huang
2022-02-18 3:20 ` [PATCH v2] " Wei Huang
2022-02-21 2:20 ` [PATCH v3] " Wei Huang
2022-02-21 2:46 ` Xu, Rosen [this message]
2022-02-21 6:34 ` [PATCH v4] " Wei Huang
2022-02-21 7:52 ` [PATCH v5] " Wei Huang
2022-02-28 7:58 ` Zhang, Tianfei
2022-03-07 22:13 ` Thomas Monjalon
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=DM6PR11MB42528E2DAD58084FE3C8FDD2893A9@DM6PR11MB4252.namprd11.prod.outlook.com \
--to=rosen.xu@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=hemant.agrawal@nxp.com \
--cc=nipun.gupta@nxp.com \
--cc=qi.z.zhang@intel.com \
--cc=stable@dpdk.org \
--cc=tianfei.zhang@intel.com \
--cc=wei.huang@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;
as well as URLs for NNTP newsgroup(s).