From patchwork Mon Mar 6 07:34:43 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: 6144 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1710683wrd; Sun, 5 Mar 2023 23:51:34 -0800 (PST) X-Google-Smtp-Source: AK7set8hobwRAZsBDMuPJzEJYhumqgS2RaFqJ5ljIGtCKGthH8OeQWw4eS7pYfF911BtpLyOnAzW X-Received: by 2002:a17:906:1e47:b0:8ae:a761:e361 with SMTP id i7-20020a1709061e4700b008aea761e361mr9536923ejj.41.1678089094616; Sun, 05 Mar 2023 23:51:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678089094; cv=none; d=google.com; s=arc-20160816; b=hTlAaCNF6FZJgUaXgrE0Qmm7P2uVO1g5ivM6ImZqyyWdYp7eBOQ8SfkGuZwyVYgCsB ntiX1raYGQ3RMWYisdZuPv6ayjanXTXD8bfjj8d5mYbthbcTMTy8fJDNyeqGYFrByhf7 t5jKMzDPXFC3Eu51INyxjGpgEHh2LqkgqO0Rqn/hr7ypDlIJ/KMfVge2MqfGVdt53V/T WhEp3HSdQoCrut4UXloOUgMjGKn7jEBO5sKFKgi+KhF98x2yJC1WTXap+nFNvVRLKy+j ue+pKk/uAbu7fSy+OtZsXB7tccy8LEKrx93WaNzFQ2g86gfxMallzvqvaFL3NbRuyqUj /w2w== 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=B3JDl7HsvcM+bR33AI6/Y1tuCPT7EaV42mkmNvh9ewY=; b=EVR/B+tU4idLZtInK8c+m2teSeNv4v/H/rE+IPPBf3UKM/t3Vd86JU38MwCbE/vfew jI/SRk6bIeCu4Ub39XfSOWqoz0xXr9FOa7/4OvOMuDW2uwkKV8bsV2bVJJwDb7YPzEU1 4TFAJz0HuOBYTXHZ2l6TaZGwNKSQGOrdr+4Fq0Ebp+U0uOSVdguSKMa5VVmMuEc3R/KK 7uVvymRPVa2QlhhMRTzB69qpnEMCUozbNfwDxBNgW8Q10RB0icS1t1eSzN2AXSRb+8e0 18SUZpSCwt1Odh0yrI91Nyh/R3MO5j5nyRCsIpbjbGQQk30tLAvc9JVDJS26XslWaf9V jjZQ== 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 h9-20020a17090619c900b008b540d6ba52si9332740ejd.227.2023.03.05.23.51.10; Sun, 05 Mar 2023 23:51:34 -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 S229803AbjCFHfK (ORCPT + 99 others); Mon, 6 Mar 2023 02:35:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229679AbjCFHfE (ORCPT ); Mon, 6 Mar 2023 02:35:04 -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 D69DEE388 for ; Sun, 5 Mar 2023 23:35:03 -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 1pZ5N2-0008Os-NA; Mon, 06 Mar 2023 08:34:57 +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 1pZ5N1-002C0m-Gw; Mon, 06 Mar 2023 08:34:55 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pZ5N0-002bam-No; Mon, 06 Mar 2023 08:34:54 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Mauro Carvalho Chehab , Stephen Boyd , Matthias Brugger Cc: linux-kernel@vger.kernel.org, AngeloGioacchino Del Regno , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@pengutronix.de Subject: [PATCH 0/3] spmi: Convert to platform remove callback returning void Date: Mon, 6 Mar 2023 08:34:43 +0100 Message-Id: <20230306073446.2194048-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=1458; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=LDehB5gsx29IvbmffavsnSV8Eu2SN5vC8ARQBx16fdE=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkBZeGXJt15Yv/ivjvwz1ZXiL3FL+DYlk2Ho0rZ BuAMxOa1WqJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZAWXhgAKCRDB/BR4rcrs CW3AB/9vd0mEZbajImYQ7YcxspnZ2asSFbRlMWaqXKeQms/i2l3cKZBq26qcx882t9TpiwyDxpa vw5OxyLIMJp5dgDjXeTTssEpYY12XhMTh8TJTVsbLYklA+9Q0JBPQkgoVJds4WCdJd8qpO7A+IU Q8ECg2+oDNQRdZhXP7IR+8MduOzvpzrPaGaCPedZqNUY4eTuLEbdNNZEF+sjncofHacPc1KDmWl 4h5e/x8C0GMrGC8NWVoVvIZ1uYJpmNdO1ha2txwHaUqvk2Hwz2VyuP5xdPDskW2JI5heJK+rPcf WAmEuKjeyACjDX5GrRlqEgLMvnx5woR95e08sBOv4xFH3zwM 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?1759603950099173384?= X-GMAIL-MSGID: =?utf-8?q?1759603950099173384?= this patch series adapts the platform drivers below drivers/spmi to use the .remove_new() callback. Compared to the traditional .remove() callback .remove_new() returns no value. This is a good thing because the driver core doesn't (and cannot) cope for errors during remove. The only effect of a non-zero return value in .remove() is that the driver core emits a warning. The device is removed anyhow and an early return from .remove() usually yields a resource leak. By changing the remove callback to return void driver authors cannot reasonably assume any more that there is some kind of cleanup later. All drivers in drivers/spmi returned zero unconditionally in their remove callback, so they could all be converted trivially to .remove_new(). Note that this series depends on commit 5c5a7680e67b ("platform: Provide a remove callback that returns no value") which is included in v6.3-rc1. Best regards Uwe Uwe Kleine-König (3): spmi: hisi-spmi-controller: Convert to platform remove callback returning void spmi: mtk-pmif: Convert to platform remove callback returning void spmi: pmic-arb: Convert to platform remove callback returning void drivers/spmi/hisi-spmi-controller.c | 5 ++--- drivers/spmi/spmi-mtk-pmif.c | 5 ++--- drivers/spmi/spmi-pmic-arb.c | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6