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: 6438 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp9279wrd; Fri, 10 Mar 2023 14:53:35 -0800 (PST) X-Google-Smtp-Source: AK7set9YpGvm5N4Lo6l/iDpSGSr3v0FAzfjnZJLyDU8GD1w0tzsIQhp8bqtMHLviP08mda5fwRPL X-Received: by 2002:a05:6a20:4904:b0:cc:f057:d3e2 with SMTP id ft4-20020a056a20490400b000ccf057d3e2mr5778489pzb.9.1678488815275; Fri, 10 Mar 2023 14:53:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678488815; cv=none; d=google.com; s=arc-20160816; b=m3WN9XZCghn9LnWVZYekic6e/AgfqsfLp9omrmqrcXmCv3b7qJHpngHPM1gZyDRV7r b/SLTHgOYSiu2S68uUKjVQWu+aAzrULYvTXmL+sxz88Ko0nFoXpbC0mT72gNMghGi/ui iEAKQx3sHIRHg7zyhosTvUnmTs4CQUMoQgB2NOKCBsmaJbgrzuokoWVZV+5Qi3qnHI5N yD26bVU2TGVjCVpKkALIaU0hehRtMe/UR0y7U0MYrQ7zrRulL8/6q0swfK2IUa5jtyyK rb+nxyjWGa0POGGyG37DcMdzjIGxGkkXCVFBPA0LYnC60ZBOgFiMAh6vb7l8a0L/9y2W zY8Q== 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 :message-id:date:subject:cc:to:from; bh=2AFx9IB9UbrmyeFN7XRER8zafAd2Rcvzhx3va+psKo4=; b=dr7pFMmg8G5S9hhw8SgqpfFX1rtm7M3qIQdjT678qKA5Su2jlVP6Noqqk23kOgaQe+ wAuwJihNVMKNQjkVm5TNGDbH9twxuA1Sg06LdCsbOQkrriiXNMJ6vbcwwOmrXBBMSGa/ CQ53776fbCsBOrSFN8y1ytYAUAc5Lsn2ywVr1Nx/fMIcyyVsPnvRoTesZCqroQRX3leD B7V9xixwEuPgvrSeIw5yaQr2bn1ZFiDnZlLN2oyPPvXxV0SM3SPcGUp8ULptvFterMiV xe2BnMUxJTlbYgpyfp1x+odpiUb2mCAKwneDBpGN7KWzUkseV4NqJMJVrwh2BGEA0+RR pI7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i184-20020a6387c1000000b004fb91aada12si904014pge.44.2023.03.10.14.53.21; Fri, 10 Mar 2023 14:53:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232019AbjCJWmy (ORCPT + 99 others); Fri, 10 Mar 2023 17:42:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231610AbjCJWm0 (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 B0D8E146937 for ; Fri, 10 Mar 2023 14:42:04 -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-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760022990729942948?= X-GMAIL-MSGID: =?utf-8?q?1760023087987507769?= 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