[PATCH] staging: lustre: osc: Fix sparse warning about osc_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When running sparse on the osc/ subdirectory, it shows the
following warning:

andreas@workbox:~/linux-next$ make C=1 M=drivers/staging/lustre/lustre/osc/
[...]
drivers/staging/lustre/lustre/osc/osc_request.c:3335:12: warning:
symbol 'osc_init' was not declared. Should it be static?
[...]

As this is the module init function, it can (and should) be declared
static.

Signed-off-by: Andreas Ruprecht <rupran@xxxxxxxxxxxx>
---
 drivers/staging/lustre/lustre/osc/osc_request.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c
index b9450b9..0adfa70 100644
--- a/drivers/staging/lustre/lustre/osc/osc_request.c
+++ b/drivers/staging/lustre/lustre/osc/osc_request.c
@@ -3332,7 +3332,7 @@ extern struct lu_kmem_descr osc_caches[];
 extern spinlock_t osc_ast_guard;
 extern struct lock_class_key osc_ast_guard_class;
 
-int __init osc_init(void)
+static int __init osc_init(void)
 {
 	struct lprocfs_static_vars lvars = { NULL };
 	int rc;
-- 
1.9.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux