public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: maxin.john@gmail.com
Cc: djbw@fb.com, vinod.koul@intel.com, geert@linux-m68k.org,
	linux-kernel@vger.kernel.org,
	"Maxin B. John" <maxin.john@enea.com>
Subject: Re: [PATCH] dma: timb_dma: Fix compiler warning
Date: Tue, 19 Feb 2013 12:36:44 +0100	[thread overview]
Message-ID: <512363CC.7000401@metafoo.de> (raw)
In-Reply-To: <1361217546-3116-1-git-send-email-maxin.john@gmail.com>

On 02/18/2013 08:59 PM, maxin.john@gmail.com wrote:
> From: "Maxin B. John" <maxin.john@enea.com>
> 
> Fix this compiler warning:
> warning: 'td_remove' defined but not used [-Wunused-function]
>
> Signed-off-by: Maxin B. John <maxin.john@enea.com>
> ---
>  drivers/dma/timb_dma.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/dma/timb_dma.c b/drivers/dma/timb_dma.c
> index 952f823..f709279 100644
> --- a/drivers/dma/timb_dma.c
> +++ b/drivers/dma/timb_dma.c
> @@ -798,7 +798,7 @@ err_release_region:
>  
>  }
>  
> -static int td_remove(struct platform_device *pdev)
> +static int __exit td_remove(struct platform_device *pdev)
>  {

>

While this fixes the warning, it's the wrong fix. The correct fix is to
remove the __exit_p. E.g. something like this:

--- a/drivers/dma/timb_dma.c
+++ b/drivers/dma/timb_dma.c
@@ -823,7 +823,7 @@ static struct platform_driver td_driver = {
 		.owner  = THIS_MODULE,
 	},
 	.probe	= td_probe,
-	.remove	= __exit_p(td_remove),
+	.remove	= td_remove,
 };

 module_platform_driver(td_driver);

  reply	other threads:[~2013-02-19 11:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-18 19:59 [PATCH] dma: timb_dma: Fix compiler warning maxin.john
2013-02-19 11:36 ` Lars-Peter Clausen [this message]
2013-02-19 12:44   ` Maxin B. John
  -- strict thread matches above, loose matches on Subject: below --
2013-02-19 20:33 maxin.john
2013-03-04 12:21 ` Maxin B. John
2013-03-04 13:56 ` Vinod Koul
2013-03-21  5:21 ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=512363CC.7000401@metafoo.de \
    --to=lars@metafoo.de \
    --cc=djbw@fb.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxin.john@enea.com \
    --cc=maxin.john@gmail.com \
    --cc=vinod.koul@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox