diff mbox series

[-next] dm integrity: Make dm_integrity_init and dm_integrity_exit static

Message ID 20190322141634.20664-1-yuehaibing@huawei.com (mailing list archive)
State Accepted, archived
Delegated to: Mike Snitzer
Headers show
Series [-next] dm integrity: Make dm_integrity_init and dm_integrity_exit static | expand

Commit Message

Yue Haibing March 22, 2019, 2:16 p.m. UTC
From: YueHaibing <yuehaibing@huawei.com>

Fix sparse warnings:

drivers/md/dm-integrity.c:3619:12: warning:
 symbol 'dm_integrity_init' was not declared. Should it be static?
drivers/md/dm-integrity.c:3638:6: warning:
 symbol 'dm_integrity_exit' was not declared. Should it be static?

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/md/dm-integrity.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Heinz Mauelshagen March 22, 2019, 2:56 p.m. UTC | #1
On 3/22/19 3:16 PM, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@huawei.com>
>
> Fix sparse warnings:
>
> drivers/md/dm-integrity.c:3619:12: warning:
>   symbol 'dm_integrity_init' was not declared. Should it be static?
> drivers/md/dm-integrity.c:3638:6: warning:
>   symbol 'dm_integrity_exit' was not declared. Should it be static?


Yes, both should be static.

Once on it, declare 'static void __exit dm_integrity_exit(void);'

Heinz


>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>   drivers/md/dm-integrity.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
> index d57d997..0932c32 100644
> --- a/drivers/md/dm-integrity.c
> +++ b/drivers/md/dm-integrity.c
> @@ -3616,7 +3616,7 @@ static struct target_type integrity_target = {
>   	.io_hints		= dm_integrity_io_hints,
>   };
>   
> -int __init dm_integrity_init(void)
> +static int __init dm_integrity_init(void)
>   {
>   	int r;
>   
> @@ -3635,7 +3635,7 @@ int __init dm_integrity_init(void)
>   	return r;
>   }
>   
> -void dm_integrity_exit(void)
> +static void dm_integrity_exit(void)
>   {
>   	dm_unregister_target(&integrity_target);
>   	kmem_cache_destroy(journal_io_cache);

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
diff mbox series

Patch

diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
index d57d997..0932c32 100644
--- a/drivers/md/dm-integrity.c
+++ b/drivers/md/dm-integrity.c
@@ -3616,7 +3616,7 @@  static struct target_type integrity_target = {
 	.io_hints		= dm_integrity_io_hints,
 };
 
-int __init dm_integrity_init(void)
+static int __init dm_integrity_init(void)
 {
 	int r;
 
@@ -3635,7 +3635,7 @@  int __init dm_integrity_init(void)
 	return r;
 }
 
-void dm_integrity_exit(void)
+static void dm_integrity_exit(void)
 {
 	dm_unregister_target(&integrity_target);
 	kmem_cache_destroy(journal_io_cache);