dma: timb_dma: Fix compiler warning
PATCH 1/1 dma: timb_dma: Fix compiler warning
From: "Maxin B. John" <[email protected]>
Fix this compiler warning:
warning: 'td_remove' defined but not used [-Wunused-function]
--- drivers/dma/timb_dma.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/dma/timb_dma.c +1 -1
@@ -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 );
Signature · 1 line
1.7.7
Quoted 15 lines · On 02/18/2013 08:59 PM, [email protected] wrote:
From: "Maxin B. John" <[email protected]>
Fix this compiler warning:
warning: 'td_remove' defined but not used [-Wunused-function]Signed-off-by Maxin B. John <[email protected]>--- drivers/dma/timb_dma.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/dma/timb_dma.c +0
-0
drivers/dma/timb_dma.c err_release_region: · line 804
Quoted 8 lines
drivers/dma/timb_dma.c +1
-1@@ -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:
drivers/dma/timb_dma.c +1 -1
@@ -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);
Quoted 31 lines · Lars-Peter Clausen
Quoted 15 lines · On 02/18/2013 08:59 PM, [email protected] wrote:
From: "Maxin B. John" <[email protected]>
Fix this compiler warning:
warning: 'td_remove' defined but not used [-Wunused-function]Signed-off-by Maxin B. John <[email protected]>--- drivers/dma/timb_dma.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/dma/timb_dma.c +0
-0drivers/dma/timb_dma.c err_release_region: · line 804
Quoted 8 lines
drivers/dma/timb_dma.c +1
-1@@ -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:
drivers/dma/timb_dma.c static struct platform_driver td_driver = { · line 829
Quoted 8 lines
drivers/dma/timb_dma.c +1
-1@@ -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