From patchwork Sat Mar 18 23:33:06 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: 13180483 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D06EBC761AF for ; Sun, 19 Mar 2023 17:07:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=g+957QiocKSz7qXmg6JCi2WjAfWaeqPaacHNmQGTf+o=; b=2enGzdcSumVesQ 4bf0wiTVssuJ5iI8WpMq9piMwOWivIW/3xaJWk1OmT28fJy7JyKHtZf2fcfx6WdwX9h2nc1NOVuIh lV2v9DWMPgRV5iEEkq36ErLgjlDcNKyCVskMo3r3gHdT/MLHJAumvWuElrz9sGBlazVa5O/cEaQAi 9LOWj2bV/j40/GpmV8dAe3mUmOHFy6+BCZK1SwZR1O8E9Ueq80FAi+SowJN5VFh98UYhTGep8C6ah cxzhM8k0GEDokZZb5g+vA3+EcEoQMYnLuHLc5RyqM6N5F1CmrvdaI9fCLOFQEI7alAv5vt5Z80oVw uGT0rK6YLNVO8LqYevTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pdwVf-0074Ph-0O; Sun, 19 Mar 2023 17:07:55 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pdg3D-005ZV5-2n for linux-i3c@lists.infradead.org; Sat, 18 Mar 2023 23:33:30 +0000 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 1pdg3A-00026C-8d; Sun, 19 Mar 2023 00:33:24 +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 1pdg38-0056Uv-5N; Sun, 19 Mar 2023 00:33:22 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pdg37-005zQn-CV; Sun, 19 Mar 2023 00:33:21 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Alexandre Belloni , =?utf-8?q?Przemys?= =?utf-8?q?=C5=82aw_Gaj?= , Miquel Raynal , Conor Culhane Cc: linux-i3c@lists.infradead.org, kernel@pengutronix.de Subject: [PATCH 0/5] i3c: Convert to platform remove callback returning void Date: Sun, 19 Mar 2023 00:33:06 +0100 Message-Id: <20230318233311.265186-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1603; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=3Ju28ANkGZ7+0geMrnYg3N6xLtjhuflkWiZYKySYKWg=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBkFkokktjz2r4BkWeJ3+jVJJW4erNC5cOsTP4e9 bsLr97JDPCJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZBZKJAAKCRCPgPtYfRL+ TgITB/4zJ3FutDotfx2+sbWOlbSFw53JnEk5o35Ky9mvOGbwCeNRGpV96HScJ0JeMKYThxIMWKr YYw8lgeKtwZ7JCSANQg6DJsFgTPAgbgtxB5mZJ3fQLYaG4PJeKORgv0cXJhort+6uiTeHrpqMYD VNSzA/qjLsEfGk+Q6FMxahma5qn/pJB5fcs81+hGMkVdfEuP38STd6jG8FmW4Z3WI7ywgHROE6W Bnc1CJIshc00jj0k0y5mnpHXrlh3n30kVoL0nxZNjIFQryeMnqYMccgPWC6xwitrZ4PmaVa7++0 tIHndjtTzSq/zHXN5WgLAwhhyX0hjSHF/XpJfD4ob4ZK/oY3 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-i3c@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230318_163327_934523_4956CC19 X-CRM114-Status: UNSURE ( 9.66 ) X-CRM114-Notice: Please train this message. X-Mailman-Approved-At: Sun, 19 Mar 2023 10:07:52 -0700 X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-i3c" Errors-To: linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org Hello, this series adapts the platform drivers below drivers/i3c 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. The first patch simplifies the remove callbacks by making i3c_master_unregister() return void. After that all drivers are converted trivially to .remove_new(). Best regards Uwe Uwe Kleine-König (5): i3c: Make i3c_master_unregister() return void i3c: dw: Convert to platform remove callback returning void i3c: cdns: Convert to platform remove callback returning void i3c: mipi-i3c-hci: Convert to platform remove callback returning void i3c: svc: Convert to platform remove callback returning void drivers/i3c/master.c | 6 +----- drivers/i3c/master/dw-i3c-master.c | 11 +++-------- drivers/i3c/master/i3c-master-cdns.c | 11 +++-------- drivers/i3c/master/mipi-i3c-hci/core.c | 6 +++--- drivers/i3c/master/svc-i3c-master.c | 11 +++-------- include/linux/i3c/master.h | 2 +- 6 files changed, 14 insertions(+), 33 deletions(-) base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6