Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp675441rwd; Wed, 7 Jun 2023 05:36:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4+3VXgEgvLcQIG8QHCIaBgiDMB9HanKLiJq40GUuoZVoGdG4k62k00fXvpGry9P9rn5bNT X-Received: by 2002:a17:90a:19c2:b0:253:87e5:384a with SMTP id 2-20020a17090a19c200b0025387e5384amr1663487pjj.42.1686141362068; Wed, 07 Jun 2023 05:36:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686141362; cv=none; d=google.com; s=arc-20160816; b=L5IZQjwMqFE9TtG4DJIA5a+9hfevdnSCtp7ya/J7tDHDFa6z9QGrAtIEl4GaJa63Gb ajEteEJBUsM0iOc+LmpeBUB2hzJnZ+WWvUktuqpJwiUZTW9M/sJaL1n7KOXwMkW/ExgT qfAnt6BUOfmb/vgA+9UfXdsYb1xUzm6EcF5+zvChpaBlTqPn+LFH+pCixF56Vl6CMgNA SI6zWk70rgD++HJrWf6wLqIBNTi6PLSgHqJjwax31KWPStNDIDLtf5U5cyEqVM+vbXjl rc4PlSpn2Ssom/i2fSLdlsiMi+rU/KK5oPJ+OAo8tJPWlhMRhhzKG4A48Qn+z8b2pOXm lphQ== 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=6WgS2itewXgwIqmxjlbCVju713PZbtSt5czOzpTuXBA=; b=RFGcfedOPypScALXgiSq1xpSeW6/z0ffjeTIFKzzOix+liyEAEgs16UsFJvBFMX0Cq lL9DV37t1pqcVKv2S3OGXGVVk+4AanBuSF1OKZgbL853SOZkBvnGr+sFsGoSOMmawIOO cyKvcllEWsGJBFFxerFOrNDagWgyMyjeX1aGD5szUnwMDsOGrQUuVxzgoodLxrkD5B9o a4B5hp+AX4ggVksYDUe+fFvxTi8nwEjl4eUT7jCI0kvEsfXuOmcITaK9TWaiC1ZRLJ7i UiMjP7rK2Jdj+SogQSxWbSP/it1qNGMHcXNkvhJ1OtIu9QTvrg8O26ugLuGTtw3ibz6N AtAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=INw8V+2U; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j31-20020a63231f000000b0053f0d8ac4b0si9051589pgj.825.2023.06.07.05.35.48; Wed, 07 Jun 2023 05:36:02 -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=INw8V+2U; 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 S239923AbjFGMIW (ORCPT + 99 others); Wed, 7 Jun 2023 08:08:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239526AbjFGMIV (ORCPT ); Wed, 7 Jun 2023 08:08:21 -0400 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF3F51BD4; Wed, 7 Jun 2023 05:08:19 -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=1686139698; 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=6WgS2itewXgwIqmxjlbCVju713PZbtSt5czOzpTuXBA=; b=INw8V+2UyFA/SPRFanuth0K/BngfjNL1jgchzheesyHYptmp5GvGnc+eRJ3pkV5Gs1jTRf u000j3TuffrZhH+D4bfp2tGaxRae2v5NO547fXC+VWipEBuHWo1969nY0W7t6xUtCWbJGo 9lPidmLHPTrqJxsOs0RFWaFWlI45okDOx6QBUJTYWugXu4nEN2ohE5cMINXi+rMJRRF6ua jn0ivkiOYqYr8+Dors43NrstoqhZbrv8fAgd+F4GTPi9pQpuVDtQIDTIrX8SMb0ofGrr97 26hwkPgxT8FC8tdyYIP4qg6TNqjAmUlJkobM+Bcz/EUrW9m6mfi1D5M8TQaDRQ== 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 X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id EAB9DE000D; Wed, 7 Jun 2023 12:08:15 +0000 (UTC) From: Maxime Chevallier To: davem@davemloft.net Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, alexis.lothore@bootlin.com, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Florian Fainelli , Heiner Kallweit , Russell King , Vladimir Oltean , Ioana Ciornei , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Maxime Coquelin , Jose Abreu , Alexandre Torgue , Giuseppe Cavallaro , Simon Horman , Maciej Fijalkowski , Feiyang Chen Subject: [PATCH net-next v4 1/5] net: altera-tse: Initialize local structs before using it Date: Wed, 7 Jun 2023 15:59:37 +0200 Message-Id: <20230607135941.407054-2-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230607135941.407054-1-maxime.chevallier@bootlin.com> References: <20230607135941.407054-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: X-Mailing-List: linux-kernel@vger.kernel.org The regmap_config and mdio_regmap_config objects needs to be zeroed before using them. 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 --- V3->V4 : Also zero "mrc" from Maciej's review V2->V3 : No changes V1->V2 : No changes drivers/net/ethernet/altera/altera_tse_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c index d866c0f1b503..215f9fb89c5b 100644 --- a/drivers/net/ethernet/altera/altera_tse_main.c +++ b/drivers/net/ethernet/altera/altera_tse_main.c @@ -1255,6 +1255,8 @@ static int altera_tse_probe(struct platform_device *pdev) if (ret) goto err_free_netdev; + memset(&pcs_regmap_cfg, 0, sizeof(pcs_regmap_cfg)); + memset(&mrc, 0, sizeof(mrc)); /* 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 -- 2.40.1