From: Tariq Toukan <tariqt@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Eran Ben Elisha <eranbe@mellanox.com>,
Tariq Toukan <tariqt@mellanox.com>
Subject: [PATCH net 2/3] net/mlx4_core: Fix uninitialized variable compilation warning
Date: Thu, 15 Nov 2018 18:05:14 +0200 [thread overview]
Message-ID: <1542297915-9442-3-git-send-email-tariqt@mellanox.com> (raw)
In-Reply-To: <1542297915-9442-1-git-send-email-tariqt@mellanox.com>
Initialize the uid variable to zero to avoid the compilation warning.
Fixes: 7a89399ffad7 ("net/mlx4: Add mlx4_bitmap zone allocator")
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx4/alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/alloc.c b/drivers/net/ethernet/mellanox/mlx4/alloc.c
index deef5a998985..9af34e03892c 100644
--- a/drivers/net/ethernet/mellanox/mlx4/alloc.c
+++ b/drivers/net/ethernet/mellanox/mlx4/alloc.c
@@ -337,7 +337,7 @@ void mlx4_zone_allocator_destroy(struct mlx4_zone_allocator *zone_alloc)
static u32 __mlx4_alloc_from_zone(struct mlx4_zone_entry *zone, int count,
int align, u32 skip_mask, u32 *puid)
{
- u32 uid;
+ u32 uid = 0;
u32 res;
struct mlx4_zone_allocator *zone_alloc = zone->allocator;
struct mlx4_zone_entry *curr_node;
--
1.8.3.1
next prev parent reply other threads:[~2018-11-16 2:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-15 16:05 [PATCH net 0/3] mlx4 fixes for 4.20-rc Tariq Toukan
2018-11-15 16:05 ` [PATCH net 1/3] net/mlx4_core: Zero out lkey field in SW2HW_MPT fw command Tariq Toukan
2018-11-15 16:05 ` Tariq Toukan [this message]
2018-11-15 16:05 ` [PATCH net 3/3] net/mlx4: Fix UBSAN warning of signed integer overflow Tariq Toukan
2018-11-16 0:11 ` [PATCH net 0/3] mlx4 fixes for 4.20-rc 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=1542297915-9442-3-git-send-email-tariqt@mellanox.com \
--to=tariqt@mellanox.com \
--cc=davem@davemloft.net \
--cc=eranbe@mellanox.com \
--cc=netdev@vger.kernel.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