From patchwork Wed Mar 8 07:39:32 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: 13165317 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 48717C64EC4 for ; Wed, 8 Mar 2023 07:40:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type: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=aNbUdPyTGrQHDiDHk9SFddfA+Q4FwnkUeFYWeiVzJuY=; b=eQzSLzHnkNxjkhHFL95LEOH77E g7BpPLfgJ6UrK2Mn4ESq3j9U6ppXnQMzpbSaBYRnz3KaVhlrx8Bjg9lp7nEwfWiPm/MioaKGgqAEy L2rxqafYeA3JdksuTrSpGL0rEe5lnV0VXb8VgUi34CvRe92lF0kxbSOAaZL9D/S12rZCf5LaMU+U0 e6ueNnoo5O72VK9VHZw3ZWK4fSE81BZ49Xmo+KeYrv3h0LCVJv7S7APSxHBS/tnmhWcJtZRN0ZtsQ OCFtQrmNqGUPga4YoNWDyLBKROkwOENMCIZfxC73PjEEco/G385pmzFrTrWQXj3CV/lKaeKDDzsCC f67EbNmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZoPK-003p0q-EM; Wed, 08 Mar 2023 07:40:18 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZoP8-003otK-PU for linux-mediatek@lists.infradead.org; Wed, 08 Mar 2023 07:40:08 +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 1pZoOv-0007OI-Er; Wed, 08 Mar 2023 08:39:53 +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 1pZoOs-002fHz-4I; Wed, 08 Mar 2023 08:39:50 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pZoOr-003ELq-EQ; Wed, 08 Mar 2023 08:39:49 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , Michael Hennerich , Support Opensource , Matthias Brugger , Thierry Reding , Andy Gross , Bjorn Andersson Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, kernel@pengutronix.de, AngeloGioacchino Del Regno , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pwm@vger.kernel.org, Konrad Dybcio , linux-arm-msm@vger.kernel.org Subject: [PATCH 00/13] backlight: Convert to platform remove callback returning void Date: Wed, 8 Mar 2023 08:39:32 +0100 Message-Id: <20230308073945.2336302-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=2935; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=Kjy1U54JR1Ng4uZuM4V7pqtJr+R0H4clHwG62u+DoeU=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkCDuPukCAhVjcRmzwgXrcBiSoubLeLaBxxeYoh x6Wc4zMzfiJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZAg7jwAKCRDB/BR4rcrs CRLBCACJQNQt47kru3bGNV4B9ox8fV7mGMj02dY2HLiYxsld+xlpfgRAPpvg0fmaz23uvo6P3eQ FUBPMUW6gH3kqXyAWDCn1TaTKhUliLtsriFDhvGyTnf9SP6fy22JVO3L9oi/IyVwws+u1eWG7wi bK1/ntPy1ABVk2jpLNsRtMxM5iEFOXPG/r4UFrRbykVXBhMELL8EK9U0q6ksaFR/Z+IGD0LDkhc 7rj7p8Eq483P8CrtGmCI02Kv9TdUUKAQ12mGXUOSeir+/4VIUBSw2yoa1PU5D8e4XOA7uEWCM88 dGuA3tRSXPcaeyapZt5m2hmWH13PxVIAnwglEtv4CPUVkoFo 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-mediatek@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230307_234006_901210_D5CEBCAF X-CRM114-Status: GOOD ( 10.51 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Hello, this patch series adapts the platform drivers below drivers/video/backlight 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/video/backlight 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 (13): backlight: aat2870_bl: Convert to platform remove callback returning void backlight: adp5520_bl: Convert to platform remove callback returning void backlight: cr_bllcd: Convert to platform remove callback returning void backlight: da9052_bl: Convert to platform remove callback returning void backlight: hp680_bl: Convert to platform remove callback returning void backlight: led_bl: Convert to platform remove callback returning void backlight: lm3533_bl: Convert to platform remove callback returning void backlight: lp8788_bl: Convert to platform remove callback returning void backlight: mt6370-backlight: Convert to platform remove callback returning void backlight: pwm_bl: Convert to platform remove callback returning void backlight: qcom-wled: Convert to platform remove callback returning void backlight: rt4831-backlight: Convert to platform remove callback returning void backlight: sky81452-backlight: Convert to platform remove callback returning void drivers/video/backlight/aat2870_bl.c | 6 ++---- drivers/video/backlight/adp5520_bl.c | 6 ++---- drivers/video/backlight/cr_bllcd.c | 6 ++---- drivers/video/backlight/da9052_bl.c | 6 ++---- drivers/video/backlight/hp680_bl.c | 6 ++---- drivers/video/backlight/led_bl.c | 6 ++---- drivers/video/backlight/lm3533_bl.c | 6 ++---- drivers/video/backlight/lp8788_bl.c | 6 ++---- drivers/video/backlight/mt6370-backlight.c | 6 ++---- drivers/video/backlight/pwm_bl.c | 6 ++---- drivers/video/backlight/qcom-wled.c | 6 ++---- drivers/video/backlight/rt4831-backlight.c | 6 ++---- drivers/video/backlight/sky81452-backlight.c | 6 ++---- 13 files changed, 26 insertions(+), 52 deletions(-) base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6 Reviewed-by: Daniel Thompson