From patchwork Tue Oct 27 13:48:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 289603 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=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, 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 5058DC83013 for ; Tue, 27 Oct 2020 15:47:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 141742065C for ; Tue, 27 Oct 2020 15:47:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603813650; bh=ucHGFjVclDJlux3L/YHmt7Dub1mqkxSXsagPJCLgCD8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=rY8hk6hfCLziYaWWoOhUiI/jggjpQJhRFCfdkK9/2GHfLX+sKi51t16UPEKXQF17Z UzS1cA8SOEhYDhjsru2WJydpXGpU7toolwhDUxWFaoNJEkXwn39fNrEM55aanpzKKy RZiIZ4OW8qhpq5dv3QZCv0zlSIxdThpdo1NyHG3c= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1802160AbgJ0Pps (ORCPT ); Tue, 27 Oct 2020 11:45:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:46118 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1798667AbgJ0P3h (ORCPT ); Tue, 27 Oct 2020 11:29:37 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 D53B722202; Tue, 27 Oct 2020 15:29:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603812576; bh=ucHGFjVclDJlux3L/YHmt7Dub1mqkxSXsagPJCLgCD8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lEDmaDkx8PJiGpq1r+GXYow2qYqRapu1CfACETOnFvkA35TsclelZobXcGKspT89z oLuJoVF42Awd+2Wt228Ns3bl2gBzek05jXQb8S8JiwtUFMJLJrptKLoCQ8cePtmprG CPg6Hmw3hKxtWqx/1Gaas+23VCC4WDj9kNIE1e98= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Moshe Tal , Aya Levin , Saeed Mahameed , Sasha Levin Subject: [PATCH 5.9 259/757] net/mlx5: Fix uninitialized variable warning Date: Tue, 27 Oct 2020 14:48:29 +0100 Message-Id: <20201027135502.726078458@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135450.497324313@linuxfoundation.org> References: <20201027135450.497324313@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Moshe Tal [ Upstream commit 19f5b63bc9932d51292d72c9dc3ec95e5dfa2289 ] 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 Signed-off-by: Sasha Levin --- 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 3dc200bcfabde..69a05da0e3e3d 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;