Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6688425rwd; Tue, 6 Jun 2023 00:01:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ64Wqmt3Vh51xORYltc75emxc8UqPK8i1HSoD5zIQd8Q7KVsXtcGlZvWFp67h8mgtJvX1Gk X-Received: by 2002:a17:902:ea09:b0:1af:adc6:3bc0 with SMTP id s9-20020a170902ea0900b001afadc63bc0mr1404857plg.5.1686034876060; Tue, 06 Jun 2023 00:01:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686034876; cv=none; d=google.com; s=arc-20160816; b=iCUJF/YViLNT0ezLrkhsHqXcrmpBiOUHjAfJ0OkX6Zly+kfDrZ8+mgHIwfmsLWqHWQ Puu84O8jAlMunP7CTWV50wsGjp0ti97Ihe/xi/FY/sWUPmMca1kTQXXcz8QRZWXn9c6c IEpv6lmKgqGdzDHM+M4QUH9TMuK5dx2b6I/Q23GDzwzix1ZX3UWh+JUhtl4gev0cJ+Kl E3oNlkjYJn5ko2KOYChNK+6dxGD73l3MP6OaBasL2zKrgFEUd2bPHtmRdEPB2U4w7X6j hudzoDKc7HwQW6nPKWVnsOm/2hBFd3ZM5u6hvO53LYOYpIyXuWSI3Btwlhr4ztFPq4O7 AvCQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f10-20020a170902860a00b001b1be13179csi6556747plo.385.2023.06.06.00.00.45; Tue, 06 Jun 2023 00:01:16 -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 S235523AbjFFGtk (ORCPT + 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 ); 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 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 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 -- 2.40.1