All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dma: timb_dma: Fix compiler warning
@ 2013-02-18 19:59 maxin.john
  2013-02-19 11:36 ` Lars-Peter Clausen
  0 siblings, 1 reply; 7+ messages in thread
From: maxin.john @ 2013-02-18 19:59 UTC (permalink / raw)
  To: djbw, vinod.koul; +Cc: geert, linux-kernel, Maxin B. John

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)
 {
 	struct timb_dma *td = platform_get_drvdata(pdev);
 	struct resource *iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] dma: timb_dma: Fix compiler warning
  2013-02-18 19:59 [PATCH] dma: timb_dma: Fix compiler warning maxin.john
@ 2013-02-19 11:36 ` Lars-Peter Clausen
  2013-02-19 12:44   ` Maxin B. John
  0 siblings, 1 reply; 7+ messages in thread
From: Lars-Peter Clausen @ 2013-02-19 11:36 UTC (permalink / raw)
  To: maxin.john; +Cc: djbw, vinod.koul, geert, linux-kernel, Maxin B. John

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);

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] dma: timb_dma: Fix compiler warning
  2013-02-19 11:36 ` Lars-Peter Clausen
@ 2013-02-19 12:44   ` Maxin B. John
  0 siblings, 0 replies; 7+ messages in thread
From: Maxin B. John @ 2013-02-19 12:44 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: djbw, vinod.koul, geert, linux-kernel, Maxin B. John

On Tue, Feb 19, 2013 at 12:36 PM, Lars-Peter Clausen <lars@metafoo.de> wrote:
> 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);

You are right, my bad. I will modify this and send the revised
version soon.

Thanks and Regards,
Maxin

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] dma: timb_dma: Fix compiler warning
  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
  2 siblings, 0 replies; 7+ messages in thread
From: Vinod Koul @ 2013-03-21  5:21 UTC (permalink / raw)
  To: maxin.john; +Cc: djbw, lars, linux-kernel, Maxin B. John

On Tue, Feb 19, 2013 at 10:33:53PM +0200, 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>
Applied, thanks

> ---
>  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..26107ba 100644
> --- 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);
> -- 
> 1.7.7
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] dma: timb_dma: Fix compiler warning
  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
  2 siblings, 0 replies; 7+ messages in thread
From: Vinod Koul @ 2013-03-04 13:56 UTC (permalink / raw)
  To: maxin.john; +Cc: djbw, lars, linux-kernel, Maxin B. John

On Tue, Feb 19, 2013 at 10:33:53PM +0200, 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>
Applied thanks

> ---
>  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..26107ba 100644
> --- 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);
> -- 
> 1.7.7
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] dma: timb_dma: Fix compiler warning
  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
  2 siblings, 0 replies; 7+ messages in thread
From: Maxin B. John @ 2013-03-04 12:21 UTC (permalink / raw)
  To: djbw, lars; +Cc: vinod.koul, linux-kernel, Maxin B. John

On Tue, Feb 19, 2013 at 9:33 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..26107ba 100644
> --- 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);
> --
> 1.7.7
>

ping..

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] dma: timb_dma: Fix compiler warning
@ 2013-02-19 20:33 maxin.john
  2013-03-04 12:21 ` Maxin B. John
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: maxin.john @ 2013-02-19 20:33 UTC (permalink / raw)
  To: djbw, lars; +Cc: vinod.koul, linux-kernel, Maxin B. John

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..26107ba 100644
--- 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);
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-03-21  5:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-18 19:59 [PATCH] dma: timb_dma: Fix compiler warning maxin.john
2013-02-19 11:36 ` Lars-Peter Clausen
2013-02-19 12:44   ` Maxin B. John
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.