Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7200512rwd; Tue, 6 Jun 2023 07:37:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ58YlhpaxBeM41lZPhcWR45AupoDpddkpX3XodC6jZRztxL59sjIAy6ZQ6/T+d7qc581UZ9 X-Received: by 2002:a05:6214:29ef:b0:621:17c6:2713 with SMTP id jv15-20020a05621429ef00b0062117c62713mr2573465qvb.49.1686062267263; Tue, 06 Jun 2023 07:37:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686062267; cv=none; d=google.com; s=arc-20160816; b=BOmHF4cu6+h/dFJ1zbHAa8bAG9c7FwU9eXsuJDZIkfFFdUuiliciuCm//V4FFhF1A0 jJXA1h23OPbcCD8wxy+WSSCCQ2aH4Kk+udrNApWIVSJjgBquZIy1dAihuXpoKiBDmIkt jb7/4gwIB/IxuM+OKtre6PrPYAsP63kY9BvxlSCv8IcvtCXgBZklKcteFvPQAbi68bEJ Pi4+tLEeeS1LSNp5W84e0aPgm1HPn75BWVMBFKaRF8jgzktuz+XXwAOCJp6u/gkxeVSf meiboLDrSJ6BerPBAlqgN6A1pHm4aYL2Y6Wnh9JBVaQrdl0TIgv64IQ7plul7KeE8f3j Zokw== 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=VThXr8NXS8rFWvl2CAIgnRHShKVVcGIlkBbj131gSq4=; b=Qr+VL3uV/WBMKOfeT6bd5zG1icpwzol42Oy5Q96UDn0O7pYgBPUHJ197PgR/NwoCHX CWCfGXFQVmrau7cH4OHU5rqz7au/VBMEtfT+6v+CC70o8wSkmauRV8/b7EIjIULSMhU7 7ujVeEcVIxMhr6r92XizUyZlJK9JcL+EjX7vmcmiVCjgg9TlMmcaKsgoeGSnb1agno33 zMEGfl8bMl3oERO+LsboisScUEBJRxX7RyDD1s9TLs46keNCoSssvE8jAyv3HPmFhFri 9TkkqazRCmPZYRTtSxI/1lVcPpAJwZJNZgXwIOrzS7efVOsgmlk+b0CVfbxArQB67q/O PQ3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=KBZSce67; 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 fo5-20020ad45f05000000b005ef676dbf8dsi6329231qvb.96.2023.06.06.07.37.32; Tue, 06 Jun 2023 07:37:47 -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=KBZSce67; 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 S230110AbjFFOVz (ORCPT + 99 others); Tue, 6 Jun 2023 10:21:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232596AbjFFOVx (ORCPT ); Tue, 6 Jun 2023 10:21:53 -0400 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 619A5E78; Tue, 6 Jun 2023 07:21:52 -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=1686061311; 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=VThXr8NXS8rFWvl2CAIgnRHShKVVcGIlkBbj131gSq4=; b=KBZSce67wV7oZbGwh6FkegmgSjVTEZ+VfIHehNbLzs58XAQKjrV7g4U6pDBFAmbQoejj/3 xWxFWDomkt+7vF8JvcBDQ6dhUrS9a4pVIMU1Sy3EzdyQpApeyozudKbOyNC7VXvj64w6jp c5U23wtx3uustnF1wuEYOiCUOyMgNHb/UB0viT+0gLUxO5RGslyP7ePYmfgn7QkyDwo5O+ xiEV7kCStqhVYjoru+WqHAwPhgG+jCfIrn/yq2tMRDegIktqWrz0M30mLeNdSbyVKUuxxl PvJE+z/UjHjF2vbXCuHxAMy404VvcHiZr+34pEdJ8vcUmxtAi2jkgJ/CEZqYmQ== 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 1EC4CC000C; Tue, 6 Jun 2023 14:21:48 +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 v2 1/3] net: altera-tse: Initialize the regmap_config struct before using it Date: Tue, 6 Jun 2023 16:21:42 +0200 Message-Id: <20230606142144.308675-2-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606142144.308675-1-maxime.chevallier@bootlin.com> References: <20230606142144.308675-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 --- V1->V2: No change 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