From patchwork Mon Mar 13 10:36:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13172185 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 9FCB3C74A4B for ; Mon, 13 Mar 2023 10:37:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229960AbjCMKhX (ORCPT ); Mon, 13 Mar 2023 06:37:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230043AbjCMKhJ (ORCPT ); Mon, 13 Mar 2023 06:37:09 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E8205B5C7 for ; Mon, 13 Mar 2023 03:37:08 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pbfY2-0008Sw-2T; Mon, 13 Mar 2023 11:36:58 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pbfY0-003pKU-G2; Mon, 13 Mar 2023 11:36:56 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbfXz-004W3X-Sk; Mon, 13 Mar 2023 11:36:55 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Madalin Bucur , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King Cc: netdev@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH net-next 1/9] net: dpaa: Improve error reporting Date: Mon, 13 Mar 2023 11:36:45 +0100 Message-Id: <20230313103653.2753139-2-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230313103653.2753139-1-u.kleine-koenig@pengutronix.de> References: <20230313103653.2753139-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1460; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=HRAv2vE0At1EkTYyhbi8BdPRV0qfZrRgP3IEO0J+5+E=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDvylIj8vaQohZCbDovqwGFDSjGm2ueZYG3zed ggoSuuVq6CJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA78pQAKCRDB/BR4rcrs CV4eB/0bbYhAIw1NmfEN+oCs9HTWtMdXadInVbFr+dccURaM2+v+1PRoerlmiVHke9ZXpPUvaV+ hEnJbqMvqNMIWMQM/+pO3+ws1cSUUIN/0rdFR9YI3mt2QlGrxqmxOAYD24Wuf8a6/MSMlHsJR4n Ibxhj92UWWF1Y93WB9Z3p61R1NbiMVy5wNA6xERZnBUe3mQlLnaxvAfrUO/YjOQoABuAQ2ppCYm F5fEH/KFEnkmZiN9gbjptof3Ai0YDI1/kS7sTPCN2PilhL0VBkrTs/kwfSZAQXOYVtBhw2uyzny WiC5wmk6PpNYqRZNKAg0rHB1clMd070oR9TleSKbMD2uLCeO X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: netdev@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Instead of the generic error message emitted by the driver core when a remove callback returns an error code ("remove callback returned a non-zero value. This will be ignored."), emit a message describing the actual problem and return zero to suppress the generic message. Note that apart from suppressing the generic error message there are no side effects by changing the return value to zero. This prepares changing the remove callback to return void. Signed-off-by: Uwe Kleine-König Acked-by: Madalin Bucur --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index 9318a2554056..97cad3750096 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c @@ -3520,6 +3520,8 @@ static int dpaa_remove(struct platform_device *pdev) phylink_destroy(priv->mac_dev->phylink); err = dpaa_fq_free(dev, &priv->dpaa_fq_list); + if (err) + dev_err(&pdev->dev, "Failed to free FQs on remove\n"); qman_delete_cgr_safe(&priv->ingress_cgr); qman_release_cgrid(priv->ingress_cgr.cgrid); @@ -3532,7 +3534,7 @@ static int dpaa_remove(struct platform_device *pdev) free_netdev(net_dev); - return err; + return 0; } static const struct platform_device_id dpaa_devtype[] = {