From patchwork Tue Sep 15 20:25:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 260841 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83042C43461 for ; Tue, 15 Sep 2020 22:06:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3DB522080C for ; Tue, 15 Sep 2020 22:06:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600207574; bh=ST3cSFqSSpB7f/pNfFFvHDFCM9EzKTIepJ3nW1RhTFA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=xphPzu6S2O+GXuq5UQeEgNrPklrelw+oxsn6HtM1SgmiC+gd33FYmKLhzGM0F8qtJ dw4RwSgHFNecvsOXZrAR5X1RIcASgv+5cTV9dXNxZDJJtHRiT811jmbaxompz+Nu0i LoxIvnRKojZKGcRJDo9aQfGPuSVAMGoMWk2+xJc4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728076AbgIOWGL (ORCPT ); Tue, 15 Sep 2020 18:06:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:53754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728016AbgIOU0A (ORCPT ); Tue, 15 Sep 2020 16:26:00 -0400 Received: from sx1.lan (c-24-6-56-119.hsd1.ca.comcast.net [24.6.56.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3914C20809; Tue, 15 Sep 2020 20:25:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600201554; bh=ST3cSFqSSpB7f/pNfFFvHDFCM9EzKTIepJ3nW1RhTFA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=drZ3yJETy9CYVELlJJW3GP8UY0+iuMFBQECnOyqyYwY00ssLxuQ2CboUlfUYGiV42 GnZlB9kOiK/gJVkWoO051nUqrzcfDEIwqkyI5jNlHuf9VdFGeWrS9/nhsntOvoW6qG AX2Cp2U+UTZjELrifmSGBUej/bUpWoymOPiLX3xc= From: saeed@kernel.org To: "David S. Miller" , Jakub Kicinski Cc: netdev@vger.kernel.org, Moshe Tal , Aya Levin , Saeed Mahameed Subject: [net-next 01/16] net/mlx5: Fix uninitialized variable warning Date: Tue, 15 Sep 2020 13:25:18 -0700 Message-Id: <20200915202533.64389-2-saeed@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200915202533.64389-1-saeed@kernel.org> References: <20200915202533.64389-1-saeed@kernel.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Moshe Tal Add variable initialization to eliminate the warning "variable may be used uninitialized". Fixes: 5f29458b77d5 ("net/mlx5e: Support dump callback in TX reporter") Signed-off-by: Moshe Tal Reviewed-by: Aya Levin Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/health.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/health.c b/drivers/net/ethernet/mellanox/mlx5/core/en/health.c index 3dc200bcfabd..69a05da0e3e3 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/health.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/health.c @@ -242,8 +242,8 @@ static int mlx5e_health_rsc_fmsg_binary(struct devlink_fmsg *fmsg, { u32 data_size; + int err = 0; u32 offset; - int err; for (offset = 0; offset < value_len; offset += data_size) { data_size = value_len - offset;