From patchwork Thu Jan 26 16:35:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13117462 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 CB17BC05027 for ; Thu, 26 Jan 2023 16:48:23 +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=s1tL6MmO8WqdiNGzFSU4OvueDmwysj8GTUoLqENu+7g=; b=SUTACovtDLHqp2 6v6Qjg8joeyOmDEtG/zmK2rNlGkCRlZh7Xnh3+oOI1NkXikAR069HfiLf6H07W4EW904zFO0ZbdYp GBu22uyZ3BMLpRR5VmSq2IbRMpnimHswKltla/nv7erqPZ5NiBss7avCyY5R94zojkDUbARgJp37f ekXnL7E9S2CKbq9Ikic09frq978kVPj1heGQVrKpUqhKvreOYL/CZhT5Pu1VWHxu8Cu+BTcusIOMZ lmuEHztRQrFCWVxQwDmOkcKS9HDxTY1pfWD7mxHdRlTR6AVrBAFHRKsQqPG4JP+eB/Yg9Z86hvdC7 ERIWjaoFdzWoF44lz0qA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pL5Oo-00BrCH-4j; Thu, 26 Jan 2023 16:46:55 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pL5Ds-00BnkL-H8 for linux-arm-kernel@lists.infradead.org; Thu, 26 Jan 2023 16:35:37 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 65274618D3; Thu, 26 Jan 2023 16:35:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 646C4C4339B; Thu, 26 Jan 2023 16:35:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674750934; bh=VEyIuxq4/HnzUlfKxp7Cc3nHkN3P8XRucXSnM9flciE=; h=From:To:Cc:Subject:Date:From; b=D7DN2wVWJXBcp6XKikYWoetVepShwy6VodFAAikSII9PrlOr0IK+KvEjtxf4d8iF8 HSfspmfHaFD/jxPdfTLx7KDDUSnLHFYV1Syp+RsCBJl2D++4OxyNYC4dLpEQYDR56v vOJsj7o703g1wJXlwHYDgXmN58PoC+tQKlTPvay7aTTwmRiDQmSTlNu5aijugNz3Cb 3L4+APgrrqLqlM8ZQmlbirlmNe9bzW3I7i6g1JEbl7BcD44Ej4CX+6ZXJ5+bmlRyq8 hs6xLNGwRUhc4Qe4/5MiQIJoRWCHu6ZgFvZY/t7vF90Z1PfRp4lmAe8IkvWaK7SFWZ AwVYX2Q4g5gZw== From: Arnd Bergmann To: Mathieu Poirier , Suzuki K Poulose , Alexander Shishkin , Tao Zhang , Mao Jinlong Cc: Arnd Bergmann , Mike Leach , Leo Yan , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] Coresight: tpda/tpdm: remove incorrect __exit annotation Date: Thu, 26 Jan 2023 17:35:14 +0100 Message-Id: <20230126163530.3495413-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230126_083536_676276_95FECD83 X-CRM114-Status: GOOD ( 14.73 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann 'remove' callbacks get called whenever a device is unbound from the driver, which can get triggered from user space. Putting it into the __exit section means that the function gets dropped in for built-in drivers, as pointed out by this build warning: `tpda_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-tpda.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-tpda.o `tpdm_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-tpdm.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-tpdm.o Fixes: 5b7916625c01 ("Coresight: Add TPDA link driver") Fixes: b3c71626a933 ("Coresight: Add coresight TPDM source driver") Signed-off-by: Arnd Bergmann --- drivers/hwtracing/coresight/coresight-tpda.c | 2 +- drivers/hwtracing/coresight/coresight-tpdm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-tpda.c b/drivers/hwtracing/coresight/coresight-tpda.c index 19c25c9f6157..382d648529e7 100644 --- a/drivers/hwtracing/coresight/coresight-tpda.c +++ b/drivers/hwtracing/coresight/coresight-tpda.c @@ -174,7 +174,7 @@ static int tpda_probe(struct amba_device *adev, const struct amba_id *id) return 0; } -static void __exit tpda_remove(struct amba_device *adev) +static void tpda_remove(struct amba_device *adev) { struct tpda_drvdata *drvdata = dev_get_drvdata(&adev->dev); diff --git a/drivers/hwtracing/coresight/coresight-tpdm.c b/drivers/hwtracing/coresight/coresight-tpdm.c index 349a82bb3270..9479a5e8c672 100644 --- a/drivers/hwtracing/coresight/coresight-tpdm.c +++ b/drivers/hwtracing/coresight/coresight-tpdm.c @@ -223,7 +223,7 @@ static int tpdm_probe(struct amba_device *adev, const struct amba_id *id) return 0; } -static void __exit tpdm_remove(struct amba_device *adev) +static void tpdm_remove(struct amba_device *adev) { struct tpdm_drvdata *drvdata = dev_get_drvdata(&adev->dev);