From patchwork Thu Jan 14 08:35:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12018881 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=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,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 D19E2C433E0 for ; Thu, 14 Jan 2021 08:36:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2AC5E239FD for ; Thu, 14 Jan 2021 08:36:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2AC5E239FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 07BF38D00C6; Thu, 14 Jan 2021 03:36:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 02C828D008E; Thu, 14 Jan 2021 03:36:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E5ECA8D00C6; Thu, 14 Jan 2021 03:36:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0073.hostedemail.com [216.40.44.73]) by kanga.kvack.org (Postfix) with ESMTP id CF0E58D008E for ; Thu, 14 Jan 2021 03:36:11 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 9C88F362D for ; Thu, 14 Jan 2021 08:36:11 +0000 (UTC) X-FDA: 77703723342.22.party20_5304ebe27525 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id 7B5E21800FB73 for ; Thu, 14 Jan 2021 08:36:11 +0000 (UTC) X-HE-Tag: party20_5304ebe27525 X-Filterd-Recvd-Size: 4473 Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Thu, 14 Jan 2021 08:36:11 +0000 (UTC) Received: by mail-ej1-f48.google.com with SMTP id t16so6908643ejf.13 for ; Thu, 14 Jan 2021 00:36:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Fpbkw1/mO8jMuG8za1QNFcPos1MTHSCasjJ+BTbNExk=; b=J7mq5d8oIlMPvxa1yhQD3Sdc9Z810Cq29qTLSqZlKyK2cnQ6+k5nfhUJxYL47SM/r6 nejTpmDy3CvJsqX9rY9Jw++xOoBU90r0Lgawhut0dyzGb5fvPR+O9M9PbTenssnh5mOj meWhyVB72R0zr1ZRucEqk6/EvxHsXl+5A3WFa/lxg5ritzjUhW3DGDaCoYagwgzB47yc rkf8MFJWgrwqJ3Nz2FuTVni8ge+kp2yU9q8w7WJke12AWosZUpS6d9rbSXmUNRtB0VHM g4K/IDqTz2WBMnIlmxzvTnPjc+RzdLZd3iBeu8n2LWZBPAZQOTw93Wx45O8MnreUJM39 vvVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Fpbkw1/mO8jMuG8za1QNFcPos1MTHSCasjJ+BTbNExk=; b=BVHhBnaqBV0p4Lxj2ZKBZYuI93Acr/SwNiL1WpMv9YCE5Wj4/sE8qlugAV/SGolM4K WFHyql678DpfXQk2RyUmuG4oCpXHA8W3F2P0XT51nHD1jpaGNVd2OODVgcB6oNXvgFXh Ooui+B2cqxRFuSIRsTnGo+ilV6f6WWcVk8weo2BZZyfErIu2UX0uYOwzpZ2TIRPU2kgM yfekT8B/aLzOAK+S9Slo3kHMNNkjuUnSJ0EeygOKa5ffjdf+YuGuFYluosMvCILwFFNY /rxcOHoKlnrRkzfD91GYMK0LfuFy+iUHDKuwjeb6sZgFdgha+EVD2o001A2g5vyfVrIK QGig== X-Gm-Message-State: AOAM530KO0heDv2iTY091s7J3Pav1BNKkZV31QDYYvcTP0vggqJq+s+L +FRDOT4LwhpiX1AwBegtKTc= X-Google-Smtp-Source: ABdhPJyrxJEcZ4allvQEUVohPvQZjcHay2GA0OidLWiWEh59pcQu/+BdYVSQER25GK4ADl+FsRFcmA== X-Received: by 2002:a17:906:5618:: with SMTP id f24mr4484156ejq.517.1610613369886; Thu, 14 Jan 2021 00:36:09 -0800 (PST) Received: from localhost.localdomain (5-12-227-87.residential.rdsnet.ro. [5.12.227.87]) by smtp.gmail.com with ESMTPSA id m24sm1680892ejo.52.2021.01.14.00.36.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jan 2021 00:36:09 -0800 (PST) From: Vladimir Oltean To: "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org Cc: Florian Fainelli , Kurt Kanzenbach , Vadym Kochan , Taras Chornyi , Ido Schimmel , clang-built-linux@googlegroups.com, linux-mm@kvack.org, kbuild-all@lists.01.org Subject: [PATCH net-next] net: marvell: prestera: fix uninitialized vid in prestera_port_vlans_add Date: Thu, 14 Jan 2021 10:35:56 +0200 Message-Id: <20210114083556.2274440-1-olteanv@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Vladimir Oltean prestera_bridge_port_vlan_add should have been called with vlan->vid, however this was masked by the presence of the local vid variable and I did not notice the build warning. Reported-by: kernel test robot Fixes: b7a9e0da2d1c ("net: switchdev: remove vid_begin -> vid_end range from VLAN objects") Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli --- drivers/net/ethernet/marvell/prestera/prestera_switchdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c b/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c index beb6447fbe40..8c2b03151736 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c @@ -1007,7 +1007,6 @@ static int prestera_port_vlans_add(struct prestera_port *port, struct prestera_bridge_port *br_port; struct prestera_switch *sw = port->sw; struct prestera_bridge *bridge; - u16 vid; if (netif_is_bridge_master(dev)) return 0; @@ -1021,7 +1020,7 @@ static int prestera_port_vlans_add(struct prestera_port *port, return 0; return prestera_bridge_port_vlan_add(port, br_port, - vid, flag_untagged, + vlan->vid, flag_untagged, flag_pvid, extack); }