[net-next,2/2] net: altera-tse: Initialize the regmap_config struct before using it
Message ID | 20230606064914.134945-3-maxime.chevallier@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3203022vqr; Tue, 6 Jun 2023 00:17:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7XYwYAliYcFkjKdUL/PfrXVy+HahPh2kj9KbJ3RA6JTehXTP5HsZUYg6fRi1+exPijcNvJ X-Received: by 2002:a05:6214:e66:b0:623:64cd:941d with SMTP id jz6-20020a0562140e6600b0062364cd941dmr1242968qvb.2.1686035839812; Tue, 06 Jun 2023 00:17:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686035839; cv=none; d=google.com; s=arc-20160816; b=Tnkank2UokPnrEY3n8oKmF3Hp148QKUWylcOQbFaxMKP7n9SdRk/W1P/6sJOcTAff5 JaHWyX7jZ5z8KVEnCzRPca5h71pba8g55k/98OQTohQX0GnLFmjADHC1nc6ZN7+dl77X vAB1eIMWd/xaLIOi82NA9uWn61Mx6XhEFcJRGmpjMGIDglZ2Zyj4R7lPTY79SCJFViVa S6q3tfYB/BaP5xXgwoQj/k76BOxJMJB/McNF+e894wZ7p2LItYRsBVY8XHv6ao8ndMqx RCN3k+oNHcKhVMCrHQy6jE04QjA8WaI/RA8zbmhl1rznCDBXIl53qc3hY/eaUBLTBXYk M1JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=29QVfpTGnIH2LbR29aG7tdJmOeyg14401QHoRbTUXIY=; b=Jpq1gyerUI/ofOzh0ixDYDPectC8eS65p0i0WUTvwLSeErB3WQC2MLX/FYL7fERjCn sMTkdBrR5lAOMIst+hnBjtfy4YnkHCZ7LL788SioShXG72X+6naT5/CR9g4CQzgfi95U 9Gwi+O5fSSXyeUzu9FHMxAshDPQwPn6aFvWgxA+5jmpiCd1wLHiAmf5fhENIG6CrWcnX vf8Bos/QfrpWCr1N7zOUEpD+KT5f803nTzUm991gNaFvrCN/5mcaM77vrvoqPxzv1lyV /eS05NQIx+Twd13DNIB2xQ58w25+0T29YBqIhS0Hj3jBDlz4oxJuHPzEWKpgt1eL06cw g16A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=bTZ9dcCj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h2-20020a0562140da200b005dda9d0227fsi5738714qvh.596.2023.06.06.00.17.05; Tue, 06 Jun 2023 00:17:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=bTZ9dcCj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235590AbjFFGtk (ORCPT <rfc822;xxoosimple@gmail.com> + 99 others); Tue, 6 Jun 2023 02:49:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235517AbjFFGt3 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 6 Jun 2023 02:49:29 -0400 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73876101; Mon, 5 Jun 2023 23:49:27 -0700 (PDT) X-GND-Sasl: maxime.chevallier@bootlin.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1686034166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=29QVfpTGnIH2LbR29aG7tdJmOeyg14401QHoRbTUXIY=; b=bTZ9dcCjWB/1uihE1QvQ61ZOd2pPJV/wY2fljBF2q0Y8sYL+ZpBTe8CpPZ0xPJfRkk3qS2 FBs9k1nYzfyS8Zir4Lqt+dEodxlvgoQ7stw1k29BV+ZjupS9zah5zVqcnOhAMsLJGuH4mA Ok1RoJVe3UDDh7CYGhediTWPtajUFBZ5nApzHX/ejhXjW3dPO0/Ma5aFjYU0SasofNDabS +XOrFt4ewPBTXRkCQg/dbf29VVbfUyosDdxte05+iBBHntGYtfP7Dc2OaOO6pco9TLcmZ1 Cgy94/aoo/3HluBrtF7HiB/PurBmbM6zDih0rbmmaY32op60xmCZDFuaZQKO+g== X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 52CE6FF80B; Tue, 6 Jun 2023 06:49:24 +0000 (UTC) From: Maxime Chevallier <maxime.chevallier@bootlin.com> To: davem@davemloft.net Cc: Maxime Chevallier <maxime.chevallier@bootlin.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, alexis.lothore@bootlin.com, thomas.petazzoni@bootlin.com, Andrew Lunn <andrew@lunn.ch>, Jakub Kicinski <kuba@kernel.org>, Eric Dumazet <edumazet@google.com>, Paolo Abeni <pabeni@redhat.com>, Florian Fainelli <f.fainelli@gmail.com>, Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk>, Vladimir Oltean <vladimir.oltean@nxp.com>, Ioana Ciornei <ioana.ciornei@nxp.com>, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Jose Abreu <joabreu@synopsys.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Giuseppe Cavallaro <peppe.cavallaro@st.com>, Simon Horman <simon.horman@corigine.com> Subject: [PATCH net-next 2/2] net: altera-tse: Initialize the regmap_config struct before using it Date: Tue, 6 Jun 2023 08:49:14 +0200 Message-Id: <20230606064914.134945-3-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606064914.134945-1-maxime.chevallier@bootlin.com> References: <20230606064914.134945-1-maxime.chevallier@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767936716758224288?= X-GMAIL-MSGID: =?utf-8?q?1767936716758224288?= |
Series |
Followup fixes for the dwmac and altera lynx conversion
|
|
Commit Message
Maxime Chevallier
June 6, 2023, 6:49 a.m. UTC
The regmap_config needs to be zeroed before using it. This will cause
spurious errors at probe time as config->pad_bits is containing random
uninitialized data.
Fixes: db48abbaa18e ("net: ethernet: altera-tse: Convert to mdio-regmap and use PCS Lynx")
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
drivers/net/ethernet/altera/altera_tse_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c index d866c0f1b503..df509abcd378 100644 --- a/drivers/net/ethernet/altera/altera_tse_main.c +++ b/drivers/net/ethernet/altera/altera_tse_main.c @@ -1255,6 +1255,7 @@ static int altera_tse_probe(struct platform_device *pdev) if (ret) goto err_free_netdev; + memset(&pcs_regmap_cfg, 0, sizeof(pcs_regmap_cfg)); /* SGMII PCS address space. The location can vary depending on how the * IP is integrated. We can have a resource dedicated to it at a specific * address space, but if it's not the case, we fallback to the mdiophy0