2022-11-22 03:36:30

by Yue Haibing

[permalink] [raw]
Subject: [PATCH -next] crypto: ccree - Fix section mismatch due to cc_debugfs_global_fini()

cc_debugfs_global_fini() is marked with __exit now, however it is used
in __init ccree_init() for cleanup. Remove the __exit annotation to fix
build warning:

WARNING: modpost: drivers/crypto/ccree/ccree.o: section mismatch in reference: init_module (section: .init.text) -> cc_debugfs_global_fini (section: .exit.text)

Fixes: 4f1c596df706 ("crypto: ccree - Remove debugfs when platform_driver_register failed")
Signed-off-by: YueHaibing <[email protected]>
---
drivers/crypto/ccree/cc_debugfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/ccree/cc_debugfs.c b/drivers/crypto/ccree/cc_debugfs.c
index 7083767602fc..8f008f024f8f 100644
--- a/drivers/crypto/ccree/cc_debugfs.c
+++ b/drivers/crypto/ccree/cc_debugfs.c
@@ -55,7 +55,7 @@ void __init cc_debugfs_global_init(void)
cc_debugfs_dir = debugfs_create_dir("ccree", NULL);
}

-void __exit cc_debugfs_global_fini(void)
+void cc_debugfs_global_fini(void)
{
debugfs_remove(cc_debugfs_dir);
}
--
2.17.1


2022-11-22 03:36:36

by Yue Haibing

[permalink] [raw]
Subject: Re: [PATCH -next] crypto: ccree - Fix section mismatch due to cc_debugfs_global_fini()

Sorry, Pls ignore this.

On 2022/11/22 11:05, YueHaibing wrote:
> cc_debugfs_global_fini() is marked with __exit now, however it is used
> in __init ccree_init() for cleanup. Remove the __exit annotation to fix
> build warning:
>
> WARNING: modpost: drivers/crypto/ccree/ccree.o: section mismatch in reference: init_module (section: .init.text) -> cc_debugfs_global_fini (section: .exit.text)
>
> Fixes: 4f1c596df706 ("crypto: ccree - Remove debugfs when platform_driver_register failed")
> Signed-off-by: YueHaibing <[email protected]>
> ---
> drivers/crypto/ccree/cc_debugfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/ccree/cc_debugfs.c b/drivers/crypto/ccree/cc_debugfs.c
> index 7083767602fc..8f008f024f8f 100644
> --- a/drivers/crypto/ccree/cc_debugfs.c
> +++ b/drivers/crypto/ccree/cc_debugfs.c
> @@ -55,7 +55,7 @@ void __init cc_debugfs_global_init(void)
> cc_debugfs_dir = debugfs_create_dir("ccree", NULL);
> }
>
> -void __exit cc_debugfs_global_fini(void)
> +void cc_debugfs_global_fini(void)
> {
> debugfs_remove(cc_debugfs_dir);
> }

2022-11-22 12:01:53

by Biju Das

[permalink] [raw]
Subject: RE: [PATCH -next] crypto: ccree - Fix section mismatch due to cc_debugfs_global_fini()

> Subject: Re: [PATCH -next] crypto: ccree - Fix section mismatch due to
> cc_debugfs_global_fini()
>
> Sorry, Pls ignore this.

This is real issue, right?

"WARNING: modpost: drivers/crypto/ccree/ccree.o: section mismatch in
reference: init_module (section: .init.text) -> cc_debugfs_global_fini
(section: .exit.text)"


Looks like the committer of the patch without building submitted the patch.
4f1c596df706 ("crypto: ccree - Remove debugfs when platform_driver_register failed")

Cheers,
Biju


>
> On 2022/11/22 11:05, YueHaibing wrote:
> > cc_debugfs_global_fini() is marked with __exit now, however it is used
> > in __init ccree_init() for cleanup. Remove the __exit annotation to
> > fix build warning:
> >
> > WARNING: modpost: drivers/crypto/ccree/ccree.o: section mismatch in
> > reference: init_module (section: .init.text) -> cc_debugfs_global_fini
> > (section: .exit.text)
> >
> > Fixes: 4f1c596df706 ("crypto: ccree - Remove debugfs when
> > platform_driver_register failed")
> > Signed-off-by: YueHaibing <[email protected]>
> > ---
> > drivers/crypto/ccree/cc_debugfs.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/crypto/ccree/cc_debugfs.c
> > b/drivers/crypto/ccree/cc_debugfs.c
> > index 7083767602fc..8f008f024f8f 100644
> > --- a/drivers/crypto/ccree/cc_debugfs.c
> > +++ b/drivers/crypto/ccree/cc_debugfs.c
> > @@ -55,7 +55,7 @@ void __init cc_debugfs_global_init(void)
> > cc_debugfs_dir = debugfs_create_dir("ccree", NULL); }
> >
> > -void __exit cc_debugfs_global_fini(void)
> > +void cc_debugfs_global_fini(void)
> > {
> > debugfs_remove(cc_debugfs_dir);
> > }

2022-11-22 12:36:06

by Yue Haibing

[permalink] [raw]
Subject: Re: [PATCH -next] crypto: ccree - Fix section mismatch due to cc_debugfs_global_fini()

On 2022/11/22 19:24, Biju Das wrote:
>> Subject: Re: [PATCH -next] crypto: ccree - Fix section mismatch due to
>> cc_debugfs_global_fini()
>>
>> Sorry, Pls ignore this.
>
> This is real issue, right?
>
> "WARNING: modpost: drivers/crypto/ccree/ccree.o: section mismatch in
> reference: init_module (section: .init.text) -> cc_debugfs_global_fini
> (section: .exit.text)"
>
>
> Looks like the committer of the patch without building submitted the patch.
> 4f1c596df706 ("crypto: ccree - Remove debugfs when platform_driver_register failed")
>

Yes, I send the patch to wrong mail list. A new version has sent.

https://lore.kernel.org/lkml/[email protected]/

> Cheers,
> Biju
>
>
>>
>> On 2022/11/22 11:05, YueHaibing wrote:
>>> cc_debugfs_global_fini() is marked with __exit now, however it is used
>>> in __init ccree_init() for cleanup. Remove the __exit annotation to
>>> fix build warning:
>>>
>>> WARNING: modpost: drivers/crypto/ccree/ccree.o: section mismatch in
>>> reference: init_module (section: .init.text) -> cc_debugfs_global_fini
>>> (section: .exit.text)
>>>
>>> Fixes: 4f1c596df706 ("crypto: ccree - Remove debugfs when
>>> platform_driver_register failed")
>>> Signed-off-by: YueHaibing <[email protected]>
>>> ---
>>> drivers/crypto/ccree/cc_debugfs.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/crypto/ccree/cc_debugfs.c
>>> b/drivers/crypto/ccree/cc_debugfs.c
>>> index 7083767602fc..8f008f024f8f 100644
>>> --- a/drivers/crypto/ccree/cc_debugfs.c
>>> +++ b/drivers/crypto/ccree/cc_debugfs.c
>>> @@ -55,7 +55,7 @@ void __init cc_debugfs_global_init(void)
>>> cc_debugfs_dir = debugfs_create_dir("ccree", NULL); }
>>>
>>> -void __exit cc_debugfs_global_fini(void)
>>> +void cc_debugfs_global_fini(void)
>>> {
>>> debugfs_remove(cc_debugfs_dir);
>>> }