From patchwork Wed Apr 5 14:09:59 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: 13201833 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 32D54C76188 for ; Wed, 5 Apr 2023 14:10:42 +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=duhlQOoB4m1V5p3W1ZtMcGQNgIXrZ/JLJlkuXQHLh+E=; b=zo42LfSnAUzuP9 lHNkIOK5N1qwSsv/OrZGIJ8I5+Htgawi/DHwjGrSEcvck3PFTUSxLK3/Mu5TuayUGTb1s25CFl6SY cr28c8Iu2/kF6bvhTy2CJGPr41ZHYncU2DDDBR8npTeX+RmWyDqDLaZFvH+jyrLl1uf3lvoX7odr4 Du7d3c37vlRzOeaYlN1OncONpVodEDAscB3xm67LAsqgpM9EQTTJWMYWkqBJXXpun4UPOL351QCdm wuIHbZVVirjNPncQ/PqHl4weMaP4Vs/0A+K/CpkZ7PXdXkBpRmG6Z9BxWSMefhpEKVhllCMtgRcZ7 EML2byQZYYbM9GGZ8DoA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pk3qN-004cWk-2P; Wed, 05 Apr 2023 14:10:35 +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 1pk3qL-004cUd-0O for linux-riscv@lists.infradead.org; Wed, 05 Apr 2023 14:10:34 +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 1pk3q6-0003FA-5Y; Wed, 05 Apr 2023 16:10:18 +0200 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 1pk3q3-009AbX-JG; Wed, 05 Apr 2023 16:10:15 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pk3q2-00AmTj-If; Wed, 05 Apr 2023 16:10:14 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Bin Liu , Greg Kroah-Hartman , Paul Cercueil , Matthias Brugger , Conor Dooley , Daire McNamara , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-usb@vger.kernel.org, kernel@pengutronix.de, linux-mips@vger.kernel.org, AngeloGioacchino Del Regno , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-riscv@lists.infradead.org, linux-omap@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: [PATCH 00/10] usb: musb: Convert to platform remove callback returning void Date: Wed, 5 Apr 2023 16:09:59 +0200 Message-Id: <20230405141009.3400693-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=2106; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=y5P77BkcrdOtb/jU7g30i0OmKFgbBK/VXLhzJ7hsVXY=; b=owGbwMvMwMXY3/A7olbonx/jabUkhhTdRn1L4VMMF7t5Ctkm2O4pe/vUrsfKRt9EMbCBXYvpZ 3b/7a2djMYsDIxcDLJiiiz2jWsyrarkIjvX/rsMM4iVCWQKAxenAEyE5Sz7/4qp33SjuSouaNRP UuliYeFZvCvTrLZIsOyg1qGT1+VuVcu6/zGWndV/ItrbIkzW8kntxSLvdQ4rrtiHqfY+89CcNKP 3xZpz8ytrS51+ia9bJ7LA4XLlH1bX3RMPztzuE8NXXt+xYWLk5eApPwQCHr1J/P59mWGe7bagWQ /M1BeFeX/1UFgUNcNly6lNAvNvF70MKrOz1d7jZak0rYqpZnfe+1Ma5+V9xPrOGs6pk1g4Z23Ai VMWB40F0ji2JL169jc2W+mTZ8dy5cCuB8UOZqGnJAU0/b/1JXscqeyx8OZ3TIm9cKHjt9essnt8 2TN2TpXoVNgZ3pkTddNQ90LqdzaJevknxjFcu5LKPCoA 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-riscv@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230405_071033_163516_F12E2F85 X-CRM114-Status: UNSURE ( 9.89 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Hello, this patch series adapts the platform drivers below drivers/usb/musb 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 touched here returned zero unconditionally in their remove callback, so they could all be converted trivially to .remove_new(). Best regards Uwe Uwe Kleine-König (10): usb: musb: da8xx: Convert to platform remove callback returning void usb: musb: jz4740: Convert to platform remove callback returning void usb: musb: mediatek: Convert to platform remove callback returning void usb: musb: mpfs: Convert to platform remove callback returning void usb: musb: musb_core: Convert to platform remove callback returning void usb: musb: musb_dsps: Convert to platform remove callback returning void usb: musb: omap2430: Convert to platform remove callback returning void usb: musb: sunxi: Convert to platform remove callback returning void usb: musb: tusb6010: Convert to platform remove callback returning void usb: musb: ux500: Convert to platform remove callback returning void drivers/usb/musb/da8xx.c | 6 ++---- drivers/usb/musb/jz4740.c | 6 ++---- drivers/usb/musb/mediatek.c | 6 ++---- drivers/usb/musb/mpfs.c | 6 ++---- drivers/usb/musb/musb_core.c | 5 ++--- drivers/usb/musb/musb_dsps.c | 6 ++---- drivers/usb/musb/omap2430.c | 6 ++---- drivers/usb/musb/sunxi.c | 6 ++---- drivers/usb/musb/tusb6010.c | 6 ++---- drivers/usb/musb/ux500.c | 6 ++---- 10 files changed, 20 insertions(+), 39 deletions(-) base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6