From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
To: dev@dpdk.org
Cc: daxuex.gao@intel.com
Subject: [PATCH] net/cxgbe: fix warnings when using optimization=1 flag
Date: Thu, 9 Jun 2022 14:19:40 +0530 [thread overview]
Message-ID: <155c777425bc32c4d287373cd711825f8de9bcf2.1654764457.git.rahul.lakkireddy@chelsio.com> (raw)
Initialize maddr and mtype to fix following warnings when
using optimization=1 compilation flag.
In file included from ../drivers/net/cxgbe/base/common.h:13,
from ../drivers/net/cxgbe/cxgbe_main.c:37:
../drivers/net/cxgbe/cxgbe_main.c: In function ‘cxgbe_probe’:
../drivers/net/cxgbe/base/t4fw_interface.h:656:7: warning: ‘maddr’ may be used uninitialized in this function [-Wmaybe-uninitialized]
((x) << S_FW_CAPS_CONFIG_CMD_MEMADDR64K_CF)
^~
../drivers/net/cxgbe/cxgbe_main.c:1111:40: note: ‘maddr’ was declared here
u32 finiver, finicsum, cfcsum, mtype, maddr, param, val;
^~~~~
In file included from ../drivers/net/cxgbe/base/common.h:13,
from ../drivers/net/cxgbe/cxgbe_main.c:37:
../drivers/net/cxgbe/base/t4fw_interface.h:648:7: warning: ‘mtype’ may be used uninitialized in this function [-Wmaybe-uninitialized]
((x) << S_FW_CAPS_CONFIG_CMD_MEMTYPE_CF)
^~
../drivers/net/cxgbe/cxgbe_main.c:1111:33: note: ‘mtype’ was declared here
u32 finiver, finicsum, cfcsum, mtype, maddr, param, val;
^~~~~
Bugzilla ID: 1029
Fixes: 6d7d651bbc15 ("net/cxgbe: read firmware configuration file from filesystem")
Reported-by: Daxue Gao <daxuex.gao@intel.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
drivers/net/cxgbe/cxgbe_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c
index 7b162af3e7..3c02c98b3d 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
@@ -1108,9 +1108,10 @@ static int cxgbe_load_fw_config_from_filesystem(struct adapter *adap,
static int cxgbe_load_fw_config(struct adapter *adap)
{
- u32 finiver, finicsum, cfcsum, mtype, maddr, param, val;
struct fw_caps_config_cmd caps_cmd = { 0 };
+ u32 finiver, finicsum, cfcsum, param, val;
const char *config_name = NULL;
+ u32 mtype = 0, maddr = 0;
int ret;
ret = cxgbe_load_fw_config_from_filesystem(adap, &config_name,
--
2.27.0
next reply other threads:[~2022-06-09 8:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-09 8:49 Rahul Lakkireddy [this message]
2022-06-09 14:02 ` Ferruh Yigit
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=155c777425bc32c4d287373cd711825f8de9bcf2.1654764457.git.rahul.lakkireddy@chelsio.com \
--to=rahul.lakkireddy@chelsio.com \
--cc=daxuex.gao@intel.com \
--cc=dev@dpdk.org \
/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).