From patchwork Tue Aug 20 00:44:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 13769234 X-Patchwork-Delegate: kuba@kernel.org Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.144.207]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 78B36A927; Tue, 20 Aug 2024 00:44:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.19.144.207 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724114688; cv=none; b=busmnXU+7zyD0SVEHnljb+yz1BBChSX+k3bIGABHpLQ2WcDLXdAtoov3umJuL3XFWst6bozVqLRxdLleMK2mMc6XuAug6DlyByDRsKjw+q0/+AeVT4Ra31pSot5M8btPvUfihpHo5qgNZPK7uSL9kESVl2fwXviu20fdztIZMOA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724114688; c=relaxed/simple; bh=SbiisiIvxEcOi5m79B5jAzNtkKLrvWHvBdoUL5vr+4o=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=FZ3a8x+Mr4czZyWpatthnJ92EiTlH/lzFokBDfJTWGMeZjLaucmAAAdUOpArutV+Jdfj8AFfiFZ7C/hy993/p6Y5cCDU2lQX0ZFbgTtAIl3t7crEw2lTqbcsrrtHpHXqMDSIJktb/gDMmITj9n2cuQ0CM7e6KK80uSIGTZPMiBE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=N+1tvxOM; arc=none smtp.client-ip=192.19.144.207 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="N+1tvxOM" Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.36.132.253]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id CB187C0000EC; Mon, 19 Aug 2024 17:44:38 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com CB187C0000EC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1724114678; bh=SbiisiIvxEcOi5m79B5jAzNtkKLrvWHvBdoUL5vr+4o=; h=From:To:Cc:Subject:Date:From; b=N+1tvxOMiLFwlf/e00X4vjlUT694Yuroeqo4sUCF3vM7BESHTXDQ8GaOBvLJGCvNU jkpQg5wm+EC64zamK409Ee7zFuvg05jWBt2B/GErVRJPR2xxD/FLqN5JcZetJnDw4I q3BltZkKFOMWvqLqOp9spKxzQICz3yQlJDGfztC8= Received: from fainelli-desktop.igp.broadcom.net (fainelli-desktop.dhcp.broadcom.net [10.67.48.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPSA id 6890418041CAE1; Mon, 19 Aug 2024 17:44:38 -0700 (PDT) From: Florian Fainelli To: netdev@vger.kernel.org Cc: robimarko@gmail.com, Florian Fainelli , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org (open list) Subject: [PATCH net-next] net: dsa: b53: Use dev_err_probe() Date: Mon, 19 Aug 2024 17:44:35 -0700 Message-Id: <20240820004436.224603-1-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Rather than print an error even when we get -EPROBE_DEFER, use dev_err_probe() to filter out those messages. Link: https://github.com/openwrt/openwrt/pull/11680 Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn --- drivers/net/dsa/b53/b53_mdio.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/dsa/b53/b53_mdio.c b/drivers/net/dsa/b53/b53_mdio.c index 897e5e8b3d69..31d070bf161a 100644 --- a/drivers/net/dsa/b53/b53_mdio.c +++ b/drivers/net/dsa/b53/b53_mdio.c @@ -343,10 +343,9 @@ static int b53_mdio_probe(struct mdio_device *mdiodev) dev_set_drvdata(&mdiodev->dev, dev); ret = b53_switch_register(dev); - if (ret) { - dev_err(&mdiodev->dev, "failed to register switch: %i\n", ret); - return ret; - } + if (ret) + return dev_err_probe(&mdiodev->dev, ret, + "failed to register switch\n"); return ret; }