From patchwork Thu Apr 7 13:06:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 12805217 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC3E8C433F5 for ; Thu, 7 Apr 2022 13:06:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238492AbiDGNIh (ORCPT ); Thu, 7 Apr 2022 09:08:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238752AbiDGNIg (ORCPT ); Thu, 7 Apr 2022 09:08:36 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57C8816E213; Thu, 7 Apr 2022 06:06:34 -0700 (PDT) Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id BB5E422175; Thu, 7 Apr 2022 15:06:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1649336792; 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; bh=mGBUqm9BChmBe7dh0JTZ4798EIwidcsw946G7NWcDFY=; b=W5h2VBtaQACq3DPMDkfvlP6xoiphSkRel7NLQpKQJl2X+Ycnm9kUlbjQIWWcQZ+VyO3Q5R kQklyg4HbnpJflIgWtoFFaM5RXMWkk+TbAGH1AZC7R1Drw4Xlloa4L1WmWJddfZe0P8/IW 4Pl7cEDAMF4p0cW1a6jLcxow0VBuMpA= From: Michael Walle To: Vladimir Oltean , Claudiu Manoil , Alexandre Belloni , Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S . Miller" , Jakub Kicinski , Paolo Abeni Cc: UNGLinuxDriver@microchip.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Walle Subject: [PATCH net-next] net: dsa: felix: suppress -EPROBE_DEFER errors Date: Thu, 7 Apr 2022 15:06:25 +0200 Message-Id: <20220407130625.190078-1-michael@walle.cc> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Due to missing prerequisites the probe of the felix switch might be deferred: [ 4.435305] mscc_felix 0000:00:00.5: Failed to register DSA switch: -517 It's not an error. Use dev_err_probe() to demote the error to a debug message. While at it, replace all the dev_err()'s in the probe with dev_err_probe(). Signed-off-by: Michael Walle --- Should this be a patch with a Fixes tag? drivers/net/dsa/ocelot/felix_vsc9959.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c index 8d382b27e625..1f8c4c6de01b 100644 --- a/drivers/net/dsa/ocelot/felix_vsc9959.c +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c @@ -2268,14 +2268,14 @@ static int felix_pci_probe(struct pci_dev *pdev, err = pci_enable_device(pdev); if (err) { - dev_err(&pdev->dev, "device enable failed\n"); + dev_err_probe(&pdev->dev, err, "device enable failed\n"); goto err_pci_enable; } felix = kzalloc(sizeof(struct felix), GFP_KERNEL); if (!felix) { err = -ENOMEM; - dev_err(&pdev->dev, "Failed to allocate driver memory\n"); + dev_err_probe(&pdev->dev, err, "Failed to allocate driver memory\n"); goto err_alloc_felix; } @@ -2293,7 +2293,7 @@ static int felix_pci_probe(struct pci_dev *pdev, &felix_irq_handler, IRQF_ONESHOT, "felix-intb", ocelot); if (err) { - dev_err(&pdev->dev, "Failed to request irq\n"); + dev_err_probe(&pdev->dev, err, "Failed to request irq\n"); goto err_alloc_irq; } @@ -2316,7 +2316,7 @@ static int felix_pci_probe(struct pci_dev *pdev, err = dsa_register_switch(ds); if (err) { - dev_err(&pdev->dev, "Failed to register DSA switch: %d\n", err); + dev_err_probe(&pdev->dev, err, "Failed to register DSA switch\n"); goto err_register_ds; }