From patchwork Mon Mar 13 07:54:26 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: 68664 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1053699wrd; Mon, 13 Mar 2023 00:59:38 -0700 (PDT) X-Google-Smtp-Source: AK7set8m89kfmRwyz/7M+EmliHfwel7qP8lZqW/1nINh6wjkE/9PAoEInNtc4jONlqtes85DgxR4 X-Received: by 2002:a05:6a20:4d8a:b0:d4:9d94:8e7c with SMTP id gj10-20020a056a204d8a00b000d49d948e7cmr1146934pzb.2.1678694378605; Mon, 13 Mar 2023 00:59:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678694378; cv=none; d=google.com; s=arc-20160816; b=upMi+dFx1s5QjWc7SNqVSJh9JLmV5qsNVFCWXv9Wv9wU+mdX6XA9a7Uh+o4uVb8fz8 5wAAGvsXvYJkIRoZtI/58ENA6xWPh8PJQVmXKy0/17vP7SMzOOfusDQzN4taHz9B0jOn GH6DrU6J64l4tvDGfA0uDm907sglYB6xLUwiDRfw1XMfkU0IzdOHR1O6gZAePjS6fCdM ypuR53D/q8ynpDnbYTuPz64CsQIYP+7zMlQ0tA7QmqD5UZwKXXJODDvkazn3UYiaWDXg XbgHL3xHUkgbhKrjDyknhahfEk3cqz+WOQaFMezL4wDAHFr0ifeCL3J2PnG7skW+DP7X TgFQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=pu4UaG9sDteehSaVU/0WbT5/oFqRuRbehJVx3F5C/vs=; b=TFGOw57XMT0gPMmz1uhnWbrQ9EgMfx7tlxkaLWWxbF56oYgA1LWJJIeFeva+XlHRMC B7W2N1U1dJlMmUNpYN/5QrC2FDEjIseNCvPucxndunBkYlSX3zvV0Mo3xipprjlS0zrU KyFe/LZ3BBNpi+weKlfAyIde/w/D1Moqfsei6sx0Ft9784qcQWRHCpqfM2jtPnnDiOp8 2lG7/5Y2J5VtqZPJFQojVA7QZZOVF/OTNfzAcKjaew/f3vYEGUNVRp2zxP1dphFCcEMl JTjjGr5b9V6p+IKXV0nN6d3LlBiymM7zbsKAVA+MhzkGIFdKs9wpM16r85pGng2dUo22 K02g== 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 p185-20020a6229c2000000b0058c800a75f6si5813997pfp.335.2023.03.13.00.59.24; Mon, 13 Mar 2023 00:59:38 -0700 (PDT) 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 S230334AbjCMH4x (ORCPT + 99 others); Mon, 13 Mar 2023 03:56:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229927AbjCMH4Y (ORCPT ); Mon, 13 Mar 2023 03:56:24 -0400 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 6D33024BE2 for ; Mon, 13 Mar 2023 00:54:41 -0700 (PDT) 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 1pbd0w-0001j7-E3; Mon, 13 Mar 2023 08:54:38 +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 1pbd0v-003nab-IO; Mon, 13 Mar 2023 08:54:37 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbd0u-004TOa-TW; Mon, 13 Mar 2023 08:54:36 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Daniel Lezcano , Thomas Gleixner Cc: linux-kernel@vger.kernel.org Subject: [PATCH 1/5] clocksource: sh_mtu2: Mark driver as non-removable Date: Mon, 13 Mar 2023 08:54:26 +0100 Message-Id: <20230313075430.2730803-2-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230313075430.2730803-1-u.kleine-koenig@pengutronix.de> References: <20230313075430.2730803-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1514; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=jqp6GOMjSpdCmxIeDGA+mPUOdQcsY6oyMOjjcWRDVUc=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDtamyYLCZb7RA67Pd0H1tRCDLB8Z9mshljoqR fIrbRirSreJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA7WpgAKCRDB/BR4rcrs CeirB/9d9M2QhXLH2MlvVnu6W3F8eUc5j9eAVNlOVHW5GUYGTTdANh5pqKxOBhEHx8KKIeLBTEB XpesoDuc3EJ0TqhsC9VQfsiPBNXUOVL8idLaMVCirR/fq1ROX6LRdQdXbtoGfDl5Mjz8RO/A9OL FbckDAI6HY7PCod4ycEW4C9lFycNfGAxQK+mk4RlhEWI0OJFn9Xqa2qLHv0J6YfEsn4qiCyZvUs Z3KwDmeQR4/mcVSA4svEkEGOhoddqnaj4cvqr4zJmrBqA4tBDFJInwklrH3E5fcY2VPpFA6n6Uq 5ucUyd/8ybZiuTQok+YBLfA8HSpNPb00gk8Ik1pS6tKIg4w0 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?1760238636940195040?= X-GMAIL-MSGID: =?utf-8?q?1760238636940195040?= The comment in the remove callback suggests that the driver is not supposed to be unbound. However returning an error code in the remove callback doesn't accomplish that. Instead set the suppress_bind_attrs property (which makes it impossible to unbind the driver via sysfs). The only remaining way to unbind a sh_tmu2 device would be module unloading, but that doesn't apply here, as the driver cannot be built as a module. Also drop the useless remove callback. Signed-off-by: Uwe Kleine-König --- drivers/clocksource/sh_mtu2.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c index 169a1fccc497..6bd2d0299397 100644 --- a/drivers/clocksource/sh_mtu2.c +++ b/drivers/clocksource/sh_mtu2.c @@ -484,11 +484,6 @@ static int sh_mtu2_probe(struct platform_device *pdev) return 0; } -static int sh_mtu2_remove(struct platform_device *pdev) -{ - return -EBUSY; /* cannot unregister clockevent */ -} - static const struct platform_device_id sh_mtu2_id_table[] = { { "sh-mtu2", 0 }, { }, @@ -503,10 +498,10 @@ MODULE_DEVICE_TABLE(of, sh_mtu2_of_table); static struct platform_driver sh_mtu2_device_driver = { .probe = sh_mtu2_probe, - .remove = sh_mtu2_remove, .driver = { .name = "sh_mtu2", .of_match_table = of_match_ptr(sh_mtu2_of_table), + .suppress_bind_attrs = true, }, .id_table = sh_mtu2_id_table, }; From patchwork Mon Mar 13 07:54:27 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: 68675 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1060039wrd; Mon, 13 Mar 2023 01:18:59 -0700 (PDT) X-Google-Smtp-Source: AK7set+sGwFi1YYZ/c4JhQrkkRmqClvK936nRU3SM33HXSAewmpoXGLyCwyUmMYuhe1cKQ+GLNmZ X-Received: by 2002:a05:6a21:3385:b0:cd:238f:4f4b with SMTP id yy5-20020a056a21338500b000cd238f4f4bmr35615579pzb.23.1678695539595; Mon, 13 Mar 2023 01:18:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678695539; cv=none; d=google.com; s=arc-20160816; b=LgB0r0uuHce7HphseTZst+u3pfsybLW4qF67qUaqkWIlsoYt5z8BIKCGeoMMsRJM+T CHrM4afK2omaHbnruFBtIBWuSYxZQFAjty+zkdpnyUwwHRYFZIKKnm3j8QBHrGqb7P7r PpQhsSKyCZb1Pr4f4kp1Gzf6RL+c1dOW9EBICn/YUpjHdnai7IcONqHa6XBDHYvcXMBR SnrPcplzIH+42dCD25jNRoxRMYGNeNj2u/Ab7GsGErPwPhOR4h4R0JklC9Kaysjp3ilf BwQstTMBvTe0ZM6e3KvjbyRzvM+5pOPsU3AAsTC3X6PA++AJZgWOjcIU7WFvmLxE/bRl 3Xjg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=mBKmAv6/O12W31aye0Wsbvmz+sBHicPNJ22jzEmLWWk=; b=e5+fz4JToEOizGLUso3BNuMS3gwXRemdUiPDOi9RqQyb8GvrDTOrA7U92m+KUhY9kv b4CgNzu/CUDmFrJdQeRpiN4cl6N0QvC0aBQHSsQ7gnLFOhkjHIeyKtXWm0I96GOWUswl VJZnacbAO/7zU1/vgX7WBRKJbV+yOVqqKrlYZYn/vOkstFhce9uJC7P1+wkOASnca+v8 w/tSqZJJa5m4dobSDqPX8oPYFik3fXdkG+oQ5jZJrjVGss5ANf0+d6yV6SITPylvVAjE i+x5zFFG8L+nkm4MipqEq/zNE+uXEW5BITrK7fOLhqfJXNPZ84EDGAkZnXeeBW9Q9Qzb 7r/Q== 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 u64-20020a638543000000b00502d7941026si5945873pgd.442.2023.03.13.01.18.44; Mon, 13 Mar 2023 01:18:59 -0700 (PDT) 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 S230348AbjCMH5A (ORCPT + 99 others); Mon, 13 Mar 2023 03:57:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229960AbjCMH41 (ORCPT ); Mon, 13 Mar 2023 03:56:27 -0400 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 2629826C2D for ; Mon, 13 Mar 2023 00:54:43 -0700 (PDT) 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 1pbd0x-0001j9-9v; Mon, 13 Mar 2023 08:54: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 1pbd0v-003nag-Vy; Mon, 13 Mar 2023 08:54:38 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbd0v-004TOd-2l; Mon, 13 Mar 2023 08:54:37 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Daniel Lezcano , Thomas Gleixner , Maxime Coquelin , Alexandre Torgue Cc: linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/5] clocksource: timer-stm32-lp: Mark driver as non-removable Date: Mon, 13 Mar 2023 08:54:27 +0100 Message-Id: <20230313075430.2730803-3-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230313075430.2730803-1-u.kleine-koenig@pengutronix.de> References: <20230313075430.2730803-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1742; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=1luB8f8PtkOpiikyFH9Ccwu5voPX5s7Env0wEM4st1Q=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDtapEmix1GST9R/1wht2UbNbrXGI69ZtbBJbq V9jmYN/gUyJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA7WqQAKCRDB/BR4rcrs CV9RB/4oYsjBQdpRw13S9H4gWYZjxGBXoOYAtrllTOalI8CmLFSgeICD0BZWUgRNA63uoHiT62p OXpp7ZnYi7V2s5aJbgfPy9HX2Bx5szg/vM+G5b+JEjcIL0Gl9o2DDcD5ooNsCpbcdpLXq1uMVkD WTKx12w4o8TyIq3+2nzDzMtC2Kdg38ZLpSg/reKLE3m+NSm3jikgbx7PuMmj0BpnWcWMUx9LXAi g7hx+V9PbwNAd4ainqYlIvM+WNnJ6dw3YJHHWxL6wMFjFerSRfZUQL87eI0DnT5bYglDystMsjw 9TbSe9/OXtZqT0463PvbnLTCoOHKzUJfIi9mZIxyRbAQ4MTH 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?1760239853917016185?= X-GMAIL-MSGID: =?utf-8?q?1760239853917016185?= The comment in the remove callback suggests that the driver is not supposed to be unbound. However returning an error code in the remove callback doesn't accomplish that. Instead set the suppress_bind_attrs property (which makes it impossible to unbind the driver via sysfs). The only remaining way to unbind an stm32-lp device would be module unloading, but that doesn't apply here, as the driver cannot be built as a module. Also drop the useless remove callback. Signed-off-by: Uwe Kleine-König --- drivers/clocksource/timer-stm32-lp.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/clocksource/timer-stm32-lp.c b/drivers/clocksource/timer-stm32-lp.c index db2841d0beb8..616ea4fe4234 100644 --- a/drivers/clocksource/timer-stm32-lp.c +++ b/drivers/clocksource/timer-stm32-lp.c @@ -195,11 +195,6 @@ static int stm32_clkevent_lp_probe(struct platform_device *pdev) return ret; } -static int stm32_clkevent_lp_remove(struct platform_device *pdev) -{ - return -EBUSY; /* cannot unregister clockevent */ -} - static const struct of_device_id stm32_clkevent_lp_of_match[] = { { .compatible = "st,stm32-lptimer-timer", }, {}, @@ -207,11 +202,11 @@ static const struct of_device_id stm32_clkevent_lp_of_match[] = { MODULE_DEVICE_TABLE(of, stm32_clkevent_lp_of_match); static struct platform_driver stm32_clkevent_lp_driver = { - .probe = stm32_clkevent_lp_probe, .remove = stm32_clkevent_lp_remove, .driver = { .name = "stm32-lptimer-timer", .of_match_table = of_match_ptr(stm32_clkevent_lp_of_match), + .suppress_bind_attrs = true, }, }; module_platform_driver(stm32_clkevent_lp_driver); From patchwork Mon Mar 13 07:54:28 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: 68663 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1053691wrd; Mon, 13 Mar 2023 00:59:36 -0700 (PDT) X-Google-Smtp-Source: AK7set+kSCYp/SMYfAbG3B1PawAjK71VrKmhqzO4XflHWMDDASEY+IM8xn4pVmqgIvt/pRekcU2U X-Received: by 2002:a17:903:22d2:b0:19c:d32a:befc with SMTP id y18-20020a17090322d200b0019cd32abefcmr37245751plg.15.1678694376089; Mon, 13 Mar 2023 00:59:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678694376; cv=none; d=google.com; s=arc-20160816; b=sSQMirVhH9ZvGR4BEivtoea2Rq9zUiXHMYoEWGsklbe2+RS7+00LSlo+RBKPxinLsS w7i9YGmRwmQX4zSbuwqBtPbh6KCd/gka1MHW3EJHL37ICO7H3GtUd4PlcJaPz63ESpmQ NCJcw3EW6wUPrjE7qgevTDkYNkKcnhzINpJmRnLO6B2gxHPlC4LBTKt0qQ7FBZrLyUvx RdJk/493iveNmbZJdvnHNLPjdhhXuk30FHP8hbqTYj45sV3H9HJGbPy3fo1gyg9tvAct aZn+JZJbQsl9YoQ2L6yFMHYNzrGCc0W/+9IHTL7e2KKjb8xDixIkoO1qC5rOAn80PvTs JOgA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=jnJ6Jf2JoCDE1MTeqHLkiH+LcEp+8y2+PreobRZO818=; b=RjAgA08Fpfr3p1CIC5x4W6FtAtYKFb0ZIFztrkXsAVK/rxR9QzWKokPJ/913nmn24J hNHwFKZ41vUuf8e8XzuMgERJ5foyir+xcXqtnvpEWFTpOmNxcYj4KSYX85nfrc67+sYk RZd4wUMlZLlQAEVPKYkzYLDM8vZazh38f73Xt3YQJiZ9MeZSaz2rwXlMj8QzalvMQsiZ D9g0gXUbY9f6y3P0ArKJNUsFjH3yn+v91rPp+1PPHpEiCRArMVoLb4L7PcRYQngY3o6c DSLUCFnCYzekRcf6ZJGPWY9rGJ1xihXmfEFmgCPYiOCVMIosZlOYIwmZjpyUNDCDjJzo tDaQ== 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 b6-20020a170902b60600b0019c354055d0si6318896pls.304.2023.03.13.00.59.21; Mon, 13 Mar 2023 00:59:36 -0700 (PDT) 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 S230311AbjCMH4v (ORCPT + 99 others); Mon, 13 Mar 2023 03:56:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230101AbjCMH4X (ORCPT ); Mon, 13 Mar 2023 03:56:23 -0400 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 6D3C52A16D for ; Mon, 13 Mar 2023 00:54:41 -0700 (PDT) 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 1pbd0w-0001jA-OO; Mon, 13 Mar 2023 08:54:38 +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 1pbd0w-003naj-2Z; Mon, 13 Mar 2023 08:54:38 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbd0v-004TOg-8C; Mon, 13 Mar 2023 08:54:37 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Daniel Lezcano , Thomas Gleixner Cc: linux-kernel@vger.kernel.org Subject: [PATCH 3/5] clocksource: timer-ti-dm: Improve error message in .remove Date: Mon, 13 Mar 2023 08:54:28 +0100 Message-Id: <20230313075430.2730803-4-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230313075430.2730803-1-u.kleine-koenig@pengutronix.de> References: <20230313075430.2730803-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1137; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=JFLgDu9G0dZdZrBAfrFBT/sAvQRPGcgYsmNCWrrkkd0=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDtascXVc4tZHw8XXjA2bAkq4kTxYDENhomOZK +lfPD6gXVyJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA7WrAAKCRDB/BR4rcrs Cf9aB/0a266jejUWRQymegTjmEjuZiTNzMbIA04dKu7N7B/DOuxscYf29RX4rb4hsDH2wF1JC3z MHImda86n2RmtQ86FtByfnd6z0472OrMwFKfbjj36Tr+a9CwKKdVV/uhIrMMZpBiNH4ri2BGeec 0Y+cXV/jkOP0BtqqzijXSP6jniz1eJejlCI+rmDm2LOnmjWc/rdX9i/mieTsdJpgBfEwnqKam1r IgiOevEHY6Et2eHeRWA++fnRzqOENRBYnnbdchp1nO+FcAyTxTRAxMcH0LoFdWLKt/K1TF2UX57 c7+dXBm8Q7gYXSZ5vDTGE+myKjGxJ0Nr+QEz4+fu6ZoOhaSL 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?1760238634405387476?= X-GMAIL-MSGID: =?utf-8?q?1760238634405387476?= If a platform driver's remove callback returns an error code, the driver core emits a generic (and thus little helpful) error message. Instead emit a more specifc error message about the actual error and return zero to suppress the core's message. Note that returning zero has no side effects apart from not emitting said error message. This prepares converting platform driver's remove message to return void. Signed-off-by: Uwe Kleine-König --- drivers/clocksource/timer-ti-dm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c index b24b903a8822..098562bda487 100644 --- a/drivers/clocksource/timer-ti-dm.c +++ b/drivers/clocksource/timer-ti-dm.c @@ -1197,7 +1197,10 @@ static int omap_dm_timer_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); - return ret; + if (ret) + dev_err(&pdev->dev, "Unable to determine timer entry in list of drivers on remove\n"); + + return 0; } static const struct omap_dm_timer_ops dmtimer_ops = { From patchwork Mon Mar 13 07:54:29 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: 68665 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1053742wrd; Mon, 13 Mar 2023 00:59:52 -0700 (PDT) X-Google-Smtp-Source: AK7set964CwW/62fF8uhZGy0SxQNjV36ANXnxtm9dx8zHVvKvq63a92NCcu1nrUCsKuwBx+VJKSH X-Received: by 2002:aa7:9984:0:b0:5a9:d5c7:199e with SMTP id k4-20020aa79984000000b005a9d5c7199emr28686748pfh.9.1678694392085; Mon, 13 Mar 2023 00:59:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678694392; cv=none; d=google.com; s=arc-20160816; b=0Hic44rqiJ/2f87BOtNwoT1Cc3bmv0wzUwVRTs5Bty6TY8svmEHql1uji9/SFAD2gU l9uq+raaiGApABOWQDeU37pA6Ia2kj5OcB/GEb6Ee1/mJR9nHlACSLCi087O8C0VJjN1 CiWKib0SPP5Xga0kH8tJU1ccD9iI37nxqkHtY9uhfv0TTHpXvLHAtd+jAO2p+uBzjSkX O8BcqN1sMchndcWOlf1Of6Did2QNjwRPJki94udYQiRznCBWw65Tht423K7E69v4lpE3 9DboOOVNk4WKl3mzubBNxqTejuAolBL9zKTe4st0Yad5yiiOBG2AeznneMnOWpciVzoE Lqaw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=2yn9x/LOjW3rZLfqOZcwYniwvWq5WENcDHx9IPKJG50=; b=IMAnvNbAo2FBYZeiJSSaHqvd72M3eO/+n2Q9pciNtrvVM/yYna76SNbec8QN6Oca3n 3vlim9xV07gmucJkezuPOy8aRMHPHyGXRmp7TqWleNvEbB3U0zncAzNNRJMnvmzl2Fht KgvN37RIGvytDyDjZpKFtczjyO8Ijugb914Y7e2632+C7Fjw2fIyZxuzEZovZAT28qWj hxMl5wQFK2HGX4YfgeCWLLG08cKKMpjOzUrdRj1nkKpSLjn44c6wGP1+1Xhw6YYFt6wa Qfk3Qxc8yiQZNp6z3Ytes/Mp0/OeDToR5VbQwc5pJCYb2b0BMHO4dqJbWUzj1CxilI5f EN+g== 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 x7-20020aa79407000000b005a8cf0d93cbsi6074497pfo.3.2023.03.13.00.59.37; Mon, 13 Mar 2023 00:59:52 -0700 (PDT) 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 S230162AbjCMH5F (ORCPT + 99 others); Mon, 13 Mar 2023 03:57:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230160AbjCMH42 (ORCPT ); Mon, 13 Mar 2023 03:56:28 -0400 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 C35EC359F for ; Mon, 13 Mar 2023 00:54:46 -0700 (PDT) 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 1pbd0w-0001jC-Ui; Mon, 13 Mar 2023 08:54:38 +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 1pbd0w-003nam-6T; Mon, 13 Mar 2023 08:54:38 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbd0v-004TOj-DO; Mon, 13 Mar 2023 08:54:37 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Daniel Lezcano , Thomas Gleixner , Thierry Reding , Jonathan Hunter Cc: linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH 4/5] clocksource: timer-tegra186: Convert to platform remove callback returning void Date: Mon, 13 Mar 2023 08:54:29 +0100 Message-Id: <20230313075430.2730803-5-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230313075430.2730803-1-u.kleine-koenig@pengutronix.de> References: <20230313075430.2730803-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1785; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=fWROh41pLFAOOuaiIIcU6R9zdNm1DYH76BDFy3r52HE=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDtavHL7WtDQHc1rbvZJIqcgl0K9PqzTyycMnC 6Nf5KH11GuJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA7WrwAKCRDB/BR4rcrs CWQLB/41/1OCgtQxaLErB4WJV6Ma17tE20bSAkkJok3pVc7CSdHeSW8eNf9kjC3KRUrj2ligs4l LIVuFA/HaxYHMAL4Yl6HqF7MIn/4xMfvbIN0H1EP/hgfBA+2dfwJcd4DsLQnIPTqGTcRSI7qmbB gjXgAvzizCICokkN1p7zKo97Nki8sgv5AGB0w89dZKRXh3IAWVCYJv4xP3rLlsYjg6fwD37jW1z 86yfBkfSrGKOuJLbsLmiHr40+xsMfDItTmlVvcS2cFckywqhSVydAjn5/tryyJqkSk102PhkH0c /6GUqM5+8JqrVQuQIZ3+iWbv7vuN16/sc7nsxUipYgkOw9bB 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?1760238650699476070?= X-GMAIL-MSGID: =?utf-8?q?1760238650699476070?= The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- drivers/clocksource/timer-tegra186.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clocksource/timer-tegra186.c b/drivers/clocksource/timer-tegra186.c index ea742889ee06..ccc762d32422 100644 --- a/drivers/clocksource/timer-tegra186.c +++ b/drivers/clocksource/timer-tegra186.c @@ -447,15 +447,13 @@ static int tegra186_timer_probe(struct platform_device *pdev) return err; } -static int tegra186_timer_remove(struct platform_device *pdev) +static void tegra186_timer_remove(struct platform_device *pdev) { struct tegra186_timer *tegra = platform_get_drvdata(pdev); clocksource_unregister(&tegra->usec); clocksource_unregister(&tegra->osc); clocksource_unregister(&tegra->tsc); - - return 0; } static int __maybe_unused tegra186_timer_suspend(struct device *dev) @@ -505,7 +503,7 @@ static struct platform_driver tegra186_wdt_driver = { .of_match_table = tegra186_timer_of_match, }, .probe = tegra186_timer_probe, - .remove = tegra186_timer_remove, + .remove_new = tegra186_timer_remove, }; module_platform_driver(tegra186_wdt_driver); From patchwork Mon Mar 13 07:54:30 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: 68671 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1059463wrd; Mon, 13 Mar 2023 01:17:01 -0700 (PDT) X-Google-Smtp-Source: AK7set/QDOT0L2rvhLST2nUkIs9Z69RUwZGJyNdehmBhl65Ly8miepZKyFqzrZxK4ClQRqvmATgD X-Received: by 2002:a17:902:d4cf:b0:19e:500b:517a with SMTP id o15-20020a170902d4cf00b0019e500b517amr39723134plg.69.1678695420798; Mon, 13 Mar 2023 01:17:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678695420; cv=none; d=google.com; s=arc-20160816; b=HLXXgeQX4NSugZi7E0dAMdIg1EoFfjbFWvRxGtLHuSjOqXHol2tFWA3CExMhSYWS9k SnX2Pi4oCRt49Gr399P+xe77bE1MHNVlaDsBWv5Blmev7rfzLwIYcj7oN0vzTy9eXMxi ksYAhMJGGVPZSvMP1qwjWgwuMaIWN1wFORmrBVx9VN9qmS+vjzFYsYSr6t5UxD/F6LLr poU9sWwdoXtDdRgbnjaxmzJPV3sGipowJXe6BbwqFWTZSlps/rw7LLDocEDFe3M49J2L XqoxQXvNjA4dgRxpRjqoUsNCiYji2+hJMWLmnDpUQSEORtfxVewQsBqDsc3paqPs0cYK rvBw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=wXFwpL38cpVPsFfuTqy0wp3LN89Pinq43rhwBzosYAY=; b=m95N240hhO9HB1/BI64mEtG/qaB99ttu4/qAAKkdPixvmvJgT2OnjMQ/SkjDadQlAt u+xEwKcnS1VfLAEQtd2rpxUi2xoAcLTKrqWBe85VKqEDWCVw9nG2xj1bYSaNlM2DXLy5 IPW8VbkYgN29rmvuAXunIu7CKsC2t9cEHGOUp7kvqVwS7pXaeOuOm8jv5uBizN8GZggA EpsBbnxoCfW+8o7jPgR0FazFgz6q9Oq+8AqYJ6eycbQsNeM4H7Mbo54h+ACScJ/X1xjt 8q9nFsrx/NcRtJJVD/9wxF5TAEcDfJmk4r22lud+8wP7rKd40Y4LqLBCVNT5pKIem+3A AEvg== 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 kl15-20020a170903074f00b0019cbe4c22f6si5975784plb.516.2023.03.13.01.16.45; Mon, 13 Mar 2023 01:17:00 -0700 (PDT) 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 S230339AbjCMH44 (ORCPT + 99 others); Mon, 13 Mar 2023 03:56:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbjCMH40 (ORCPT ); Mon, 13 Mar 2023 03:56:26 -0400 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 3DE9554CAC for ; Mon, 13 Mar 2023 00:54:42 -0700 (PDT) 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 1pbd0x-0001jH-04; Mon, 13 Mar 2023 08:54: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 1pbd0w-003nap-Bg; Mon, 13 Mar 2023 08:54:38 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbd0v-004TOn-Il; Mon, 13 Mar 2023 08:54:37 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Daniel Lezcano , Thomas Gleixner Cc: linux-kernel@vger.kernel.org Subject: [PATCH 5/5] clocksource: timer-ti-dm: Convert to platform remove callback returning void Date: Mon, 13 Mar 2023 08:54:30 +0100 Message-Id: <20230313075430.2730803-6-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230313075430.2730803-1-u.kleine-koenig@pengutronix.de> References: <20230313075430.2730803-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1920; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=jWLwC9JWT1zAkN3MuVmGacjm0Ju2XN58CNDdUcULjW0=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDtayowyjk/IGAmlFJ43CRKgvHOPq7G6WGJL55 GpXMyDV2KeJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA7WsgAKCRDB/BR4rcrs CWXEB/9i8nksWGfGxjcU5//fTFQp0JrVL+aYr3XZNVBokMVlPNHovvmtXwb0ar6hVrucmdOaQHc HQbvBRj+FQSk1WtmBTgEF2wZWZGfY0FXFEvKHIguHvUYn5EHxB5b4VaOO/ZXbSOGBT7TEPcABA4 JZ31uuaja0mtksTBiwKJ1Z7VRc/m7FRUfWhVgUNIxfiAj8ulaYkciidGmEhhsbFp/mI4qpFmrRa 4SaPqeKVWPF5duWabzo5KDd1Fvm4VVd+6Oaeg21ORxpcuogQUXcbk3eKYRWCKLUtcrxcoVh4lea lQ4bqwekXbs5usuzy+hIv+AuE36wL46ttE4fjAIOSONntrze 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?1760239729523990541?= X-GMAIL-MSGID: =?utf-8?q?1760239729523990541?= The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- drivers/clocksource/timer-ti-dm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c index 098562bda487..ab7a6caa36c5 100644 --- a/drivers/clocksource/timer-ti-dm.c +++ b/drivers/clocksource/timer-ti-dm.c @@ -1177,7 +1177,7 @@ static int omap_dm_timer_probe(struct platform_device *pdev) * In addition to freeing platform resources it also deletes the timer * entry from the local list. */ -static int omap_dm_timer_remove(struct platform_device *pdev) +static void omap_dm_timer_remove(struct platform_device *pdev) { struct dmtimer *timer; unsigned long flags; @@ -1199,8 +1199,6 @@ static int omap_dm_timer_remove(struct platform_device *pdev) if (ret) dev_err(&pdev->dev, "Unable to determine timer entry in list of drivers on remove\n"); - - return 0; } static const struct omap_dm_timer_ops dmtimer_ops = { @@ -1275,7 +1273,7 @@ MODULE_DEVICE_TABLE(of, omap_timer_match); static struct platform_driver omap_dm_timer_driver = { .probe = omap_dm_timer_probe, - .remove = omap_dm_timer_remove, + .remove_new = omap_dm_timer_remove, .driver = { .name = "omap_timer", .of_match_table = omap_timer_match,