[Drbd-dev] [PATCH 12/13] drivers: block: Mark function as static in drbd_state.c

Rashika Kheria rashika.kheria at gmail.com
Thu Dec 19 10:48:37 CET 2013


Mark functions conn_old_common_state() and conn_set_state() as static in
drbd/drbd_state.c because they are not used outside this file.

This eliminates the following warnings in drbd/drbd_state.c:
drivers/block/drbd/drbd_state.c:1585:6: warning: no previous prototype for ‘conn_old_common_state’ [-Wmissing-prototypes]
drivers/block/drbd/drbd_state.c:1674:1: warning: no previous prototype for ‘conn_set_state’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria at gmail.com>
Reviewed-by: Josh Triplett <josh at joshtriplett.org>
---
 drivers/block/drbd/drbd_state.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/block/drbd/drbd_state.c b/drivers/block/drbd/drbd_state.c
index 120e1c0..9c20c34 100644
--- a/drivers/block/drbd/drbd_state.c
+++ b/drivers/block/drbd/drbd_state.c
@@ -1579,7 +1579,8 @@ static int w_after_conn_state_ch(struct drbd_work *w, int unused)
 	return 0;
 }
 
-void conn_old_common_state(struct drbd_tconn *tconn, union drbd_state *pcs, enum chg_state_flags *pf)
+static void conn_old_common_state(struct drbd_tconn *tconn,
+		union drbd_state *pcs, enum chg_state_flags *pf)
 {
 	enum chg_state_flags flags = ~0;
 	struct drbd_conf *mdev;
@@ -1667,7 +1668,7 @@ conn_is_valid_transition(struct drbd_tconn *tconn, union drbd_state mask, union
 	return rv;
 }
 
-void
+static void
 conn_set_state(struct drbd_tconn *tconn, union drbd_state mask, union drbd_state val,
 	       union drbd_state *pns_min, union drbd_state *pns_max, enum chg_state_flags flags)
 {
-- 
1.7.9.5



More information about the drbd-dev mailing list