[PATCH 05/13] drivers: block: Move prototype declaration toappropriate header file from drbd_main.c

From: Rashika Kheria
Date: Thu Dec 19 2013 - 04:38:27 EST


Move prototype declaration of functions drbdd_init() and drbd_asender()
from drbd/drbd_main.c to header file drbd/drbd_int.h because these
functions are used by more than one file.

This eliminates the following warning in drbd/drbd_receiver.c:
drivers/block/drbd/drbd_receiver.c:4836:5: warning: no previous prototype for âdrbdd_initâ [-Wmissing-prototypes]
drivers/block/drbd/drbd_receiver.c:5245:5: warning: no previous prototype for âdrbd_asenderâ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@xxxxxxxxx>
Reviewed-by: Josh Triplett <josh@xxxxxxxxxxxxxxxx>
---
drivers/block/drbd/drbd_int.h | 4 ++++
drivers/block/drbd/drbd_main.c | 2 --
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index 0e06f0c..0cc79f4 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -587,6 +587,10 @@ struct drbd_epoch {
unsigned long flags;
};

+/* Prototype declaration of function defined in drbd_receiver.c */
+int drbdd_init(struct drbd_thread *);
+int drbd_asender(struct drbd_thread *);
+
/* drbd_epoch flag bits */
enum {
DE_HAVE_BARRIER_NUMBER,
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 9e3818b..4a24e71 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -57,9 +57,7 @@
#include "drbd_vli.h"

static DEFINE_MUTEX(drbd_main_mutex);
-int drbdd_init(struct drbd_thread *);
int drbd_worker(struct drbd_thread *);
-int drbd_asender(struct drbd_thread *);

int drbd_init(void);
static int drbd_open(struct block_device *bdev, fmode_t mode);
--
1.7.9.5

--
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/