Patchwork crypto: talitos - Fix modpost warning

login
register
mail settings
Submitter Kumar Gala
Date Dec. 3, 2008, 4:29 a.m.
Message ID <1228278556-1056-1-git-send-email-galak@kernel.crashing.org>
Download mbox | patch
Permalink /patch/11870/
State Superseded
Delegated to: Kumar Gala
Headers show

Comments

Kumar Gala - Dec. 3, 2008, 4:29 a.m.
Removed __devexit from talitos_remove() since its also called from
talitos_probe().

WARNING: vmlinux.o(.text+0x28a008): Section mismatch in reference from the function talitos_probe() to the function .devexit.text:talitos_remove()
The function talitos_probe() references a function in an exit section.
Often the function talitos_remove() has valid usage outside the exit section
and the fix is to remove the __devexit annotation of talitos_remove.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 drivers/crypto/talitos.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Herbert Xu - Dec. 3, 2008, 12:06 p.m.
On Tue, Dec 02, 2008 at 10:29:16PM -0600, Kumar Gala wrote:
> Removed __devexit from talitos_remove() since its also called from
> talitos_probe().
> 
> WARNING: vmlinux.o(.text+0x28a008): Section mismatch in reference from the function talitos_probe() to the function .devexit.text:talitos_remove()
> The function talitos_probe() references a function in an exit section.
> Often the function talitos_remove() has valid usage outside the exit section
> and the fix is to remove the __devexit annotation of talitos_remove.
> 
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>

OK, but what about the __devexit_p reference on talitos_remove?
We should remove that too.

Thanks,
Kumar Gala - Dec. 3, 2008, 2:52 p.m.
On Dec 3, 2008, at 6:06 AM, Herbert Xu wrote:

> On Tue, Dec 02, 2008 at 10:29:16PM -0600, Kumar Gala wrote:
>> Removed __devexit from talitos_remove() since its also called from
>> talitos_probe().
>>
>> WARNING: vmlinux.o(.text+0x28a008): Section mismatch in reference  
>> from the function talitos_probe() to the  
>> function .devexit.text:talitos_remove()
>> The function talitos_probe() references a function in an exit  
>> section.
>> Often the function talitos_remove() has valid usage outside the  
>> exit section
>> and the fix is to remove the __devexit annotation of talitos_remove.
>>
>> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>
> OK, but what about the __devexit_p reference on talitos_remove?
> We should remove that too.

missed that one.  will fix up and post a new patch.

- k
Kumar Gala - Dec. 3, 2008, 3:36 p.m.
On Dec 3, 2008, at 8:52 AM, Kumar Gala wrote:

>
> On Dec 3, 2008, at 6:06 AM, Herbert Xu wrote:
>
>> On Tue, Dec 02, 2008 at 10:29:16PM -0600, Kumar Gala wrote:
>>> Removed __devexit from talitos_remove() since its also called from
>>> talitos_probe().
>>>
>>> WARNING: vmlinux.o(.text+0x28a008): Section mismatch in reference  
>>> from the function talitos_probe() to the  
>>> function .devexit.text:talitos_remove()
>>> The function talitos_probe() references a function in an exit  
>>> section.
>>> Often the function talitos_remove() has valid usage outside the  
>>> exit section
>>> and the fix is to remove the __devexit annotation of talitos_remove.
>>>
>>> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>>
>> OK, but what about the __devexit_p reference on talitos_remove?
>> We should remove that too.
>
> missed that one.  will fix up and post a new patch.

Nevermind.  Al bet me to this fix :)

- k

Patch

diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
index b6ad3ac..2479348 100644
--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
@@ -1357,7 +1357,7 @@  static int hw_supports(struct device *dev, __be32 desc_hdr_template)
 	return ret;
 }
 
-static int __devexit talitos_remove(struct of_device *ofdev)
+static int talitos_remove(struct of_device *ofdev)
 {
 	struct device *dev = &ofdev->dev;
 	struct talitos_private *priv = dev_get_drvdata(dev);