Re: [PATCH] dma: timb_dma: Fix compiler warning

From: Maxin B. John
Date: Tue Feb 19 2013 - 07:44:58 EST


On Tue, Feb 19, 2013 at 12:36 PM, Lars-Peter Clausen <lars@xxxxxxxxxx> wrote:
> On 02/18/2013 08:59 PM, maxin.john@xxxxxxxxx wrote:
>> From: "Maxin B. John" <maxin.john@xxxxxxxx>
>>
>> Fix this compiler warning:
>> warning: 'td_remove' defined but not used [-Wunused-function]
>>
>> Signed-off-by: Maxin B. John <maxin.john@xxxxxxxx>
>> ---
>> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/