From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 49013C4332F for ; Mon, 19 Dec 2022 12:24:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WO7SMnv+EWGVctJ6jqXyEsJF97V6oE4jhhJbY0ZXLOw=; b=sf5oynmXG51oGt lEMMSrRLMi8g+TngvIBiEyncAEywC/JkQtTVCfby5Z0xT4nJ1g262lIF80U46JKZ/HVNxqBWMesCB TSJNC3QOIN3UidzMlVqH3BiYs8ez8dF2IWKNzAsVF7EPsGgRnhAHd8V9pzkedaoN1dGRpUIcwX19c M1hsF4vghQWHa9Wse09tpcioc2MWkgnCk/4hwVVC5ysMBlIXgxuIhGrtgMopsN9WYPafEq6XTfMsD 8/L6B4ArckgexJ6vWyq2SoCudBODG/zpWXerxMAbpri+/Swj6GqP+E4wDFp1Kax+9I5GCotIUuZC5 5fG2wtRAZoXd262sNuPg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p7FAA-00D6uB-Eq; Mon, 19 Dec 2022 12:22:37 +0000 Received: from mga05.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p7F8I-00D620-Bw for linux-arm-kernel@lists.infradead.org; Mon, 19 Dec 2022 12:20:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671452438; x=1702988438; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=FpYAPKna/QrtXHDcnodhTDjW1+/oAPh/VEk9ch82x9U=; b=Ee5+l1L+4Tsxm6AZ9N5eGD8q1aVbdKv0HcCY3TLnb/vNCCucCXVl3lvK s33SUtbuj9OIBohlrAS+Sf0qcGEG4wggRRtO5iP+gtVRs8bylZH3aD8BJ TiZgL1jF33v2eu8V3pqy6mDxtPYIpsVpBQmYgA2XXwaksysqhe3k6TkdG NY25+sQfS7+B3qYM2LLJnkV3SRQA2lW/VAnqtkZwlDzmxzv8CrXcvFt82 HT5PJ2N18qfvfKaE00bLvUXTT2HBji9GaM6UJztucn/0oHjRIGrNCanNv EQu829Q047roJ8VS9WzURZ6DqUWiAhTcM3Tfg9uu4idZpBEzwQ9HduOkC A==; X-IronPort-AV: E=McAfee;i="6500,9779,10565"; a="405588712" X-IronPort-AV: E=Sophos;i="5.96,255,1665471600"; d="scan'208";a="405588712" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Dec 2022 04:20:29 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10565"; a="739317797" X-IronPort-AV: E=Sophos;i="5.96,255,1665471600"; d="scan'208";a="739317797" Received: from unknown (HELO localhost.localdomain) ([10.237.112.144]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Dec 2022 04:20:26 -0800 Date: Mon, 19 Dec 2022 13:20:16 +0100 From: Michal Swiatkowski To: Horatiu Vultur Cc: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, lars.povlsen@microchip.com, Steen.Hegelund@microchip.com, daniel.machon@microchip.com, UNGLinuxDriver@microchip.com, kernel test robot , Dan Carpenter , Saeed Mahameed Subject: Re: [PATCH net v2] net: microchip: vcap: Fix initialization of value and mask Message-ID: References: <20221219082215.76652-1-horatiu.vultur@microchip.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221219082215.76652-1-horatiu.vultur@microchip.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221219_042038_784463_D06ABFCA X-CRM114-Status: GOOD ( 17.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Dec 19, 2022 at 09:22:15AM +0100, Horatiu Vultur wrote: > Fix the following smatch warning: > > smatch warnings: > drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c:103 vcap_debugfs_show_rule_keyfield() error: uninitialized symbol 'value'. > drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c:106 vcap_debugfs_show_rule_keyfield() error: uninitialized symbol 'mask'. > > In case the vcap field was VCAP_FIELD_U128 and the key was different > than IP6_S/DIP then the value and mask were not initialized, therefore > initialize them. > > Fixes: 610c32b2ce66 ("net: microchip: vcap: Add vcap_get_rule") > Reported-by: kernel test robot > Reported-by: Dan Carpenter > Reviewed-by: Saeed Mahameed > Signed-off-by: Horatiu Vultur > --- > v1->v2: > - rebase on net > - both the mask and value were assigned to data->u128.value, which is > wrong, fix this. > --- > drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c b/drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c > index 895bfff550d23..e0b206247f2eb 100644 > --- a/drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c > +++ b/drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c > @@ -83,6 +83,8 @@ static void vcap_debugfs_show_rule_keyfield(struct vcap_control *vctrl, > hex = true; > break; > case VCAP_FIELD_U128: > + value = data->u128.value; > + mask = data->u128.mask; > if (key == VCAP_KF_L3_IP6_SIP || key == VCAP_KF_L3_IP6_DIP) { > u8 nvalue[16], nmask[16]; > > -- > 2.38.0 Looks fine Reviewed-by: Michal Swiatkowski _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel