From patchwork Fri Mar 10 22:41:22 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: 13170321 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 49A03C6FA99 for ; Fri, 10 Mar 2023 22:42:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231833AbjCJWmw (ORCPT ); Fri, 10 Mar 2023 17:42:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231678AbjCJWm0 (ORCPT ); Fri, 10 Mar 2023 17:42:26 -0500 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 9B84312DDEB for ; Fri, 10 Mar 2023 14:42:06 -0800 (PST) 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 1palQh-0002d9-AB; Fri, 10 Mar 2023 23:41:39 +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 1palQe-003GqF-FD; Fri, 10 Mar 2023 23:41:36 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1palQd-003uES-O4; Fri, 10 Mar 2023 23:41:35 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Stuart Yoder , Laurentiu Tudor , Roy Pledge , Li Yang , =?utf-8?q?Horia_Geant=C4=83?= , Pankaj Gupta , Gaurav Jain , Herbert Xu , "David S. Miller" , Vinod Koul , Ioana Ciornei , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Yangbo Lu , Diana Craciun , Alex Williamson , Richard Cochran Cc: kernel@pengutronix.de, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, dmaengine@vger.kernel.org, netdev@vger.kernel.org, kvm@vger.kernel.org Subject: [PATCH 0/6] bus: fsl-mc: Make remove function return void Date: Fri, 10 Mar 2023 23:41:22 +0100 Message-Id: <20230310224128.2638078-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1698; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=9JhTrjmQKjtQFlUasQrySTFuLZLu/NtOD5qmM4eufeE=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkC7H+eh7sOlGHBG4L1QyBTw+rzQkNoN+qxvPCW eOgwZqzcbSJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZAux/gAKCRDB/BR4rcrs CbK0B/0cW9Eel9XtT+/ciaqOL8Ou4+Z2zYziEPD7ScbF4q+swN4VVcdYcsxqOOR5SiCfeGux/vG nfJ22a6m2IawQ7zblHVSfehklr+v3pYyUgmnGpbO5okqmN/5jUpGzX065Jj5HYNwZAslY6DAflI D5Ck9zcwuJo37fBXnMh2xpLh7KcYnpLZ5pqRB7J21MV8GIG74zP6OK4PeYlRknsbM0JK4bxYke/ tM6VZ35AX9hYDbmv+HLyVdwO4NLT3cOwA+5Jq4gUz+86LDPobXlAeUjXFOBmILtaEfOPHG8f9+Y 3mUfL1lOujCuuV9tHfDxz2xosDkMqNZKtFI0Gu2kAo5I3Wig 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: linux-crypto@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hello, many bus remove functions return an integer which is a historic misdesign that makes driver authors assume that there is some kind of error handling in the upper layers. This is wrong however and returning and error code only yields an error message. This series improves the fsl-mc bus by changing the remove callback to return no value instead. As a preparation all drivers are changed to return zero before so that they don't trigger the error message. Best regards Uwe Uwe Kleine-König (6): bus: fsl-mc: Only warn once about errors on device unbind bus: fsl-mc: dprc: Push down error message from fsl_mc_driver_remove() bus: fsl-mc: fsl-mc-allocator: Drop if block with always wrong condition bus: fsl-mc: fsl-mc-allocator: Improve error reporting soc: fsl: dpio: Suppress duplicated error reporting on device remove bus: fsl-mc: Make remove function return void drivers/bus/fsl-mc/dprc-driver.c | 12 ++++----- drivers/bus/fsl-mc/fsl-mc-allocator.c | 27 ++++++++++--------- drivers/bus/fsl-mc/fsl-mc-bus.c | 7 +---- drivers/crypto/caam/caamalg_qi2.c | 4 +-- drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c | 4 +-- .../net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 +-- .../net/ethernet/freescale/dpaa2/dpaa2-ptp.c | 4 +-- .../ethernet/freescale/dpaa2/dpaa2-switch.c | 4 +-- drivers/soc/fsl/dpio/dpio-driver.c | 8 +----- drivers/vfio/fsl-mc/vfio_fsl_mc.c | 3 +-- include/linux/fsl/mc.h | 2 +- 11 files changed, 28 insertions(+), 51 deletions(-) base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6 Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei # sanity checks Reviewed-by: Laurentiu Tudor Tested-by: Laurentiu Tudor