Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4023898pxb; Mon, 8 Feb 2021 06:16:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzHthxYZxvj/pA8pXh8AQQp55nfC5jbj0oaYaI1EScDnrHNRke6dPG5puPlZYX3gyv8A0To X-Received: by 2002:a17:906:880f:: with SMTP id zh15mr4629519ejb.268.1612793762733; Mon, 08 Feb 2021 06:16:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612793762; cv=none; d=google.com; s=arc-20160816; b=givBy6aL669xDlk6l2LtUq1PbGa9nFdkDqMauXOM+UBorgmTBalL7QSEyaLmxi2sze FmKOxVkVkfR7XsJ6dHHEwgK+ZaxT+W4/WcNH9sV6DmcDhEfORI9ubCBTNyj3geMDdOxP EElau3yAn0W1YgCDSqaKQRKkrLFCtkiKhm65xNzOd0gsNcXSTUfKQh7MwNu4zAdvEdlK +7NvCJFT0iup+obXzGKYG+FZ+QyPD/Max5OURLGhTkzKT7bGhZYPWp1xLjJ2bs/0rsf/ dWKAOLY9/fFzWBApEXYimoRMaY7qbYIjKSg2ei3Y+i1M2UIoh24wD+mO8do6d4Xq0PyY oV6w== 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; bh=ThPo+ySSOGof+kHGLcp9KdRE8x3P3W/qRcmaPkUmuTE=; b=jOIkTYp2CjX8RoKE6+rFC8jV3SlYB55166aov98o4ulIVuvBf/U8aAEj3zwhjtj94w 40vLcoZyI/1jUoyVOxwGlWm1iBos2nZVjP0yK3LUomDKlpc9g8p5EIo96FxuTehPK0yQ uApgzspxVen2BGTfTR1jYRPX6KbkNpNHhaC5G8NRB4EAZLkALDOW4NWrI0z1Et2cxoQr xYhLQ3JugZRKx4kwZcLpfMj4hLNGIjLsWCAkvoS19B5YiC4jA9UqcByYBxj9X9I044f8 zW8j+bHfhbZqNBMACBuZi6TboYzgf15Jtl0wK9Z6n+T1ZnnYxlwmmEtcbcG7GG4uBrpT ppbw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a4si1539088ejx.563.2021.02.08.06.15.36; Mon, 08 Feb 2021 06:16:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232274AbhBHOOE (ORCPT + 99 others); Mon, 8 Feb 2021 09:14:04 -0500 Received: from mail.baikalelectronics.com ([87.245.175.226]:57086 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231638AbhBHN6d (ORCPT ); Mon, 8 Feb 2021 08:58:33 -0500 From: Serge Semin To: Rob Herring , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Jakub Kicinski , Johan Hovold , Maxime Ripard , Joao Pinto , Lars Persson , Maxime Coquelin CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Vyacheslav Mitrofanov , , , , , , Anson Huang Subject: [PATCH v2 18/24] net: stmmac: dwc-qos: Use dev_err_probe() for probe errors handling Date: Mon, 8 Feb 2021 16:56:02 +0300 Message-ID: <20210208135609.7685-19-Sergey.Semin@baikalelectronics.ru> In-Reply-To: <20210208135609.7685-1-Sergey.Semin@baikalelectronics.ru> References: <20210208135609.7685-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is a very handy dev_err_probe() method to handle the deferred probe error number. It reduces the code size and identations, uniforms error handling, records the defer probe reason, etc. Use it to print the probe callback error message. Signed-off-by: Serge Semin Cc: Anson Huang --- drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c index 20b3696fb776..b71f0c3faebe 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c @@ -466,10 +466,8 @@ static int dwc_eth_dwmac_probe(struct platform_device *pdev) ret = data->probe(pdev, plat_dat, &stmmac_res); if (ret < 0) { - if (ret != -EPROBE_DEFER) - dev_err(&pdev->dev, "failed to probe subdriver: %d\n", - ret); - + dev_err_probe(&pdev->dev, ret, "failed to probe subdriver: %d\n", + ret); goto remove_config; } -- 2.29.2