From: Prarit Bhargava <prarit@redhat.com>
To: netdev@vger.kernel.org
Cc: Prarit Bhargava <prarit@redhat.com>,
dledford@redhat.com, Amir Vadai <amirv@mellanox.com>,
Or Gerlitz <ogerlitz@mellanox.com>
Subject: [PATCH] net, mellanox mlx4 Fix compile warnings
Date: Fri, 13 Sep 2013 08:30:38 -0400 [thread overview]
Message-ID: <1379075438-20240-1-git-send-email-prarit@redhat.com> (raw)
Fix unitialized variable warnings.
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function ‘mlx4_HW2SW_CQ_wrapper’:
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:2551:16: error: ‘cq’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
atomic_dec(&cq->mtt->ref_count);
^
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function ‘mlx4_HW2SW_SRQ_wrapper’:
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:2734:17: error: ‘srq’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
atomic_dec(&srq->mtt->ref_count);
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: dledford@redhat.com
Cc: Amir Vadai <amirv@mellanox.com>
Cc: Or Gerlitz <ogerlitz@mellanox.com>
---
.../net/ethernet/mellanox/mlx4/resource_tracker.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
index dd68763..d703838 100644
--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
+++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
@@ -2563,7 +2563,7 @@ int mlx4_HW2SW_CQ_wrapper(struct mlx4_dev *dev, int slave,
{
int err;
int cqn = vhcr->in_modifier;
- struct res_cq *cq;
+ struct res_cq *uninitialized_var(cq);
err = cq_res_start_move_to(dev, slave, cqn, RES_CQ_ALLOCATED, &cq);
if (err)
@@ -2746,7 +2746,7 @@ int mlx4_HW2SW_SRQ_wrapper(struct mlx4_dev *dev, int slave,
{
int err;
int srqn = vhcr->in_modifier;
- struct res_srq *srq;
+ struct res_srq *uninitialized_var(srq);
err = srq_res_start_move_to(dev, slave, srqn, RES_SRQ_ALLOCATED, &srq);
if (err)
--
1.7.9.3
next reply other threads:[~2013-09-13 12:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-13 12:30 Prarit Bhargava [this message]
2013-09-14 19:10 ` [PATCH] net, mellanox mlx4 Fix compile warnings Or Gerlitz
2013-09-15 6:14 ` Jack Morgenstein
2013-09-15 6:22 ` ZHAO Gang
2013-09-15 6:27 ` ZHAO Gang
2013-09-16 8:59 ` David Laight
2013-09-16 12:14 ` Prarit Bhargava
2013-09-16 13:52 ` Jack Morgenstein
2013-09-17 1:25 ` David Miller
2013-09-17 19:13 ` [PATCH 2/2] " Prarit Bhargava
2013-09-17 19:25 ` Or Gerlitz
2013-09-17 19:28 ` David Miller
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=1379075438-20240-1-git-send-email-prarit@redhat.com \
--to=prarit@redhat.com \
--cc=amirv@mellanox.com \
--cc=dledford@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.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).