From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A49C9C4361A for ; Fri, 4 Dec 2020 18:29:24 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 43C3122C9C for ; Fri, 4 Dec 2020 18:29:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 43C3122C9C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=X/PEq85PvYfgfZC3uWRhmpoeTiv3tL5GzoiAxnRsI6k=; b=Za6/6SIiXx3sKNTiQ+RHNflmg 8o6YDR84NGZ1bypspkCw4lTpJZp2zTSZkvB6EoWO1DkLlsdsBumqV1Hv+W0J+7XJgJsjxW5VmL06n mQz8ulshI2pBTgz4QcTYnqrHXCRtIfAXRapszkazkO0WFRJ8l8RyjYFaw/GBjY1vEOGlunRtHQO08 XaYdBmAbxkXK4rb4SzKJcdlniW/8kqX6MYs1J2W4TGkpCGHy4SwdjlzjyepkSgGFzv1Ucv3242S8L mX+Z1pfDArGtz8DNGbGPkZxnEwjAfIGkKPMLS3gCi0JbiYFUcxEdrXKvAuiM/vMShJgx4549yW1BM c56HrQX/A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1klFoG-0001sv-0L; Fri, 04 Dec 2020 18:28:00 +0000 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1klFoD-0001rx-BT for linux-arm-kernel@lists.infradead.org; Fri, 04 Dec 2020 18:27:58 +0000 Received: by mail-pj1-x1044.google.com with SMTP id l23so3658275pjg.1 for ; Fri, 04 Dec 2020 10:27:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=UiBa8wrmmIee1HgOai5JrghjADTpG0X/oWxIh9/BKcM=; b=R3szqApXOzhleqO5LbirR5gKIfTfm8VKz55yhE0zOFyg0zKv+hipO3Rx2b1V5cFtKC Hy5c1vRajoueHiyvN18vwiD8vCBxHVBLuhiZ9/2l3fA7/ROpImr/w+De57U0KYMNZSRw 0taFxcw3rDis/hHIjNspHR+/I0A8nmMiOVDpD4R7rWoyrtbo/EZE2XNbKYUSOdTc0qBK SoFJzg9VLjNUSiJHgn2BH+QUMCNNbRrFWfPpm3JbSPfiHOfxFzcUfzMw66LoAFtXQhou PM6i6G9WyXv2xr7mgOy76z68oFUfXisN9MsiInrfm3DrRZWx0ClbypPm/vP/s2dii8B8 HKeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=UiBa8wrmmIee1HgOai5JrghjADTpG0X/oWxIh9/BKcM=; b=ZeGiFk+ETCoYJwqORKtBPJYP0tvusCUbuvrjt9tMZnpczaJ/z7wDLuiwQtbZIFfkmI A+GwB5YeC7PnvF3x3IAEFDGFcDcoBJ0HAN+wVCDM98A9m/SPDOj3JsN4EAiTmTLtm9Ph TvMAlei2LC97QhXTN+uZVzqzGxMsLwaD6XTfaVUDiD7Fbnw45g+Fu+dDyHkOdVGGKl7r e2zScram+aSgr0gp0L3q4F4JptBGKLDjbKDfDuljU/Yu9lbE6mqTZs50+MFsUmMiFoIV gaBBVQxMaiMnM6SAAAfu70ABaErpWuthkgFrPZ2tGdunftk+SdijMNWPxxnUaIvmC8LG PWYQ== X-Gm-Message-State: AOAM531FsKQtnsYMO6JAQjWLeYhEtvDw0E7aBy4BhDCdGZarWhkn+aAj xqgV0jgsrS/+3gUny675doAIoA== X-Google-Smtp-Source: ABdhPJwjVB3oS+U5cw5V+eL+8QbuK3M+h2Ct8oaf9k7GFRKPKFNbm4X73N4XxlNifkH+lzTIfd37XA== X-Received: by 2002:a17:90a:bd16:: with SMTP id y22mr5127131pjr.203.1607106474631; Fri, 04 Dec 2020 10:27:54 -0800 (PST) Received: from xps15 (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id i16sm5543737pfr.183.2020.12.04.10.27.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2020 10:27:54 -0800 (PST) Date: Fri, 4 Dec 2020 11:27:51 -0700 From: Mathieu Poirier To: Arnd Bergmann Subject: Re: [PATCH] coresight: remove broken __exit annotations Message-ID: <20201204182751.GA1424711@xps15> References: <20201203231232.1482792-1-arnd@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201203231232.1482792-1-arnd@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201204_132757_507772_FF9FE064 X-CRM114-Status: GOOD ( 24.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sai Prakash Ranjan , Kim Phillips , Arnd Bergmann , Suzuki K Poulose , Alexander Shishkin , Greg Kroah-Hartman , coresight@lists.linaro.org, Mian Yousaf Kaukab , linux-kernel@vger.kernel.org, Stephen Boyd , linux-arm-kernel@lists.infradead.org, Tingwei Zhang , Leo Yan , linux-stm32@st-md-mailman.stormreply.com, Dan Carpenter , Mike Leach Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Dec 04, 2020 at 12:11:40AM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > Functions that are annotated __exit are discarded for built-in drivers, > but the .remove callback in a device driver must still be kept around > to allow bind/unbind operations. > > There is now a linker warning for the discarded symbol references: > > `tmc_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-tmc-core.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-tmc-core.o > `tpiu_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-tpiu.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-tpiu.o > `etb_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-etb10.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-etb10.o > `static_funnel_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-funnel.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-funnel.o > `dynamic_funnel_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-funnel.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-funnel.o > `static_replicator_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-replicator.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-replicator.o > `dynamic_replicator_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-replicator.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-replicator.o > `catu_remove' referenced in section `.data' of drivers/hwtracing/coresight/coresight-catu.o: defined in discarded section `.exit.text' of drivers/hwtracing/coresight/coresight-catu.o > > Remove all those annotations. > > Fixes: 8b0cf82677d1 ("coresight: stm: Allow to build coresight-stm as a module") > Signed-off-by: Arnd Bergmann I have applied this patch. > --- > drivers/hwtracing/coresight/coresight-catu.c | 2 +- > drivers/hwtracing/coresight/coresight-cti-core.c | 2 +- > drivers/hwtracing/coresight/coresight-etb10.c | 2 +- > drivers/hwtracing/coresight/coresight-etm3x-core.c | 4 ++-- > drivers/hwtracing/coresight/coresight-etm4x-core.c | 4 ++-- > drivers/hwtracing/coresight/coresight-funnel.c | 6 +++--- > drivers/hwtracing/coresight/coresight-replicator.c | 6 +++--- > drivers/hwtracing/coresight/coresight-stm.c | 2 +- > drivers/hwtracing/coresight/coresight-tmc-core.c | 2 +- > drivers/hwtracing/coresight/coresight-tpiu.c | 2 +- > 10 files changed, 16 insertions(+), 16 deletions(-) > > diff --git a/drivers/hwtracing/coresight/coresight-catu.c b/drivers/hwtracing/coresight/coresight-catu.c > index 99430f6cf5a5..a61313f320bd 100644 > --- a/drivers/hwtracing/coresight/coresight-catu.c > +++ b/drivers/hwtracing/coresight/coresight-catu.c > @@ -567,7 +567,7 @@ static int catu_probe(struct amba_device *adev, const struct amba_id *id) > return ret; > } > > -static int __exit catu_remove(struct amba_device *adev) > +static int catu_remove(struct amba_device *adev) > { > struct catu_drvdata *drvdata = dev_get_drvdata(&adev->dev); > > diff --git a/drivers/hwtracing/coresight/coresight-cti-core.c b/drivers/hwtracing/coresight/coresight-cti-core.c > index d28eae93e55c..61dbc1afd8da 100644 > --- a/drivers/hwtracing/coresight/coresight-cti-core.c > +++ b/drivers/hwtracing/coresight/coresight-cti-core.c > @@ -836,7 +836,7 @@ static void cti_device_release(struct device *dev) > if (drvdata->csdev_release) > drvdata->csdev_release(dev); > } > -static int __exit cti_remove(struct amba_device *adev) > +static int cti_remove(struct amba_device *adev) > { > struct cti_drvdata *drvdata = dev_get_drvdata(&adev->dev); > > diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c > index 1b320ab581ca..0cf6f0b947b6 100644 > --- a/drivers/hwtracing/coresight/coresight-etb10.c > +++ b/drivers/hwtracing/coresight/coresight-etb10.c > @@ -803,7 +803,7 @@ static int etb_probe(struct amba_device *adev, const struct amba_id *id) > return ret; > } > > -static int __exit etb_remove(struct amba_device *adev) > +static int etb_remove(struct amba_device *adev) > { > struct etb_drvdata *drvdata = dev_get_drvdata(&adev->dev); > > diff --git a/drivers/hwtracing/coresight/coresight-etm3x-core.c b/drivers/hwtracing/coresight/coresight-etm3x-core.c > index 47f610b1c2b1..5bf5a5a4ce6d 100644 > --- a/drivers/hwtracing/coresight/coresight-etm3x-core.c > +++ b/drivers/hwtracing/coresight/coresight-etm3x-core.c > @@ -902,14 +902,14 @@ static int etm_probe(struct amba_device *adev, const struct amba_id *id) > return 0; > } > > -static void __exit clear_etmdrvdata(void *info) > +static void clear_etmdrvdata(void *info) > { > int cpu = *(int *)info; > > etmdrvdata[cpu] = NULL; > } > > -static int __exit etm_remove(struct amba_device *adev) > +static int etm_remove(struct amba_device *adev) > { > struct etm_drvdata *drvdata = dev_get_drvdata(&adev->dev); > > diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c > index d78a37b6592c..3ad5c2a01033 100644 > --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c > +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c > @@ -1575,14 +1575,14 @@ static struct amba_cs_uci_id uci_id_etm4[] = { > } > }; > > -static void __exit clear_etmdrvdata(void *info) > +static void clear_etmdrvdata(void *info) > { > int cpu = *(int *)info; > > etmdrvdata[cpu] = NULL; > } > > -static int __exit etm4_remove(struct amba_device *adev) > +static int etm4_remove(struct amba_device *adev) > { > struct etmv4_drvdata *drvdata = dev_get_drvdata(&adev->dev); > > diff --git a/drivers/hwtracing/coresight/coresight-funnel.c b/drivers/hwtracing/coresight/coresight-funnel.c > index 39be46b74dfe..071c723227db 100644 > --- a/drivers/hwtracing/coresight/coresight-funnel.c > +++ b/drivers/hwtracing/coresight/coresight-funnel.c > @@ -274,7 +274,7 @@ static int funnel_probe(struct device *dev, struct resource *res) > return ret; > } > > -static int __exit funnel_remove(struct device *dev) > +static int funnel_remove(struct device *dev) > { > struct funnel_drvdata *drvdata = dev_get_drvdata(dev); > > @@ -328,7 +328,7 @@ static int static_funnel_probe(struct platform_device *pdev) > return ret; > } > > -static int __exit static_funnel_remove(struct platform_device *pdev) > +static int static_funnel_remove(struct platform_device *pdev) > { > funnel_remove(&pdev->dev); > pm_runtime_disable(&pdev->dev); > @@ -370,7 +370,7 @@ static int dynamic_funnel_probe(struct amba_device *adev, > return funnel_probe(&adev->dev, &adev->res); > } > > -static int __exit dynamic_funnel_remove(struct amba_device *adev) > +static int dynamic_funnel_remove(struct amba_device *adev) > { > return funnel_remove(&adev->dev); > } > diff --git a/drivers/hwtracing/coresight/coresight-replicator.c b/drivers/hwtracing/coresight/coresight-replicator.c > index 6772f23e5c4b..7e2a2b7f503f 100644 > --- a/drivers/hwtracing/coresight/coresight-replicator.c > +++ b/drivers/hwtracing/coresight/coresight-replicator.c > @@ -291,7 +291,7 @@ static int replicator_probe(struct device *dev, struct resource *res) > return ret; > } > > -static int __exit replicator_remove(struct device *dev) > +static int replicator_remove(struct device *dev) > { > struct replicator_drvdata *drvdata = dev_get_drvdata(dev); > > @@ -318,7 +318,7 @@ static int static_replicator_probe(struct platform_device *pdev) > return ret; > } > > -static int __exit static_replicator_remove(struct platform_device *pdev) > +static int static_replicator_remove(struct platform_device *pdev) > { > replicator_remove(&pdev->dev); > pm_runtime_disable(&pdev->dev); > @@ -388,7 +388,7 @@ static int dynamic_replicator_probe(struct amba_device *adev, > return replicator_probe(&adev->dev, &adev->res); > } > > -static int __exit dynamic_replicator_remove(struct amba_device *adev) > +static int dynamic_replicator_remove(struct amba_device *adev) > { > return replicator_remove(&adev->dev); > } > diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing/coresight/coresight-stm.c > index 32d29704206b..99791773f682 100644 > --- a/drivers/hwtracing/coresight/coresight-stm.c > +++ b/drivers/hwtracing/coresight/coresight-stm.c > @@ -951,7 +951,7 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id) > return ret; > } > > -static int __exit stm_remove(struct amba_device *adev) > +static int stm_remove(struct amba_device *adev) > { > struct stm_drvdata *drvdata = dev_get_drvdata(&adev->dev); > > diff --git a/drivers/hwtracing/coresight/coresight-tmc-core.c b/drivers/hwtracing/coresight/coresight-tmc-core.c > index 5653e0945c74..8169dff5a9f6 100644 > --- a/drivers/hwtracing/coresight/coresight-tmc-core.c > +++ b/drivers/hwtracing/coresight/coresight-tmc-core.c > @@ -559,7 +559,7 @@ static void tmc_shutdown(struct amba_device *adev) > spin_unlock_irqrestore(&drvdata->spinlock, flags); > } > > -static int __exit tmc_remove(struct amba_device *adev) > +static int tmc_remove(struct amba_device *adev) > { > struct tmc_drvdata *drvdata = dev_get_drvdata(&adev->dev); > > diff --git a/drivers/hwtracing/coresight/coresight-tpiu.c b/drivers/hwtracing/coresight/coresight-tpiu.c > index 010762a46087..d5dfee9ee556 100644 > --- a/drivers/hwtracing/coresight/coresight-tpiu.c > +++ b/drivers/hwtracing/coresight/coresight-tpiu.c > @@ -173,7 +173,7 @@ static int tpiu_probe(struct amba_device *adev, const struct amba_id *id) > return PTR_ERR(drvdata->csdev); > } > > -static int __exit tpiu_remove(struct amba_device *adev) > +static int tpiu_remove(struct amba_device *adev) > { > struct tpiu_drvdata *drvdata = dev_get_drvdata(&adev->dev); > > -- > 2.27.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel