* [PATCH 01/13] drivers: block: Mark the functions as static in skd_main.c
@ 2013-12-19 9:32 Rashika Kheria
2013-12-19 9:33 ` [PATCH 02/13] drivers: block: Remove unused function drbd_bm_write_lazy() in drbd_bitmap.c Rashika Kheria
` (12 more replies)
0 siblings, 13 replies; 15+ messages in thread
From: Rashika Kheria @ 2013-12-19 9:32 UTC (permalink / raw)
To: linux-kernel
Cc: Jens Axboe, Bartlomiej Zolnierkiewicz, Kyungmin Park,
Ramprasad Chinthekindi, Akhil Bhansali, josh
Mark functions skd_skmsg_state_to_str() and skd_skreq_state_to_str() as
static in skd_main.c because they are not used outside this file.
This eliminates the following warnings in skd_main.c:
drivers/block/skd_main.c:5272:13: warning: no previous prototype for ‘skd_skmsg_state_to_str’ [-Wmissing-prototypes]
drivers/block/skd_main.c:5284:13: warning: no previous prototype for ‘skd_skreq_state_to_str’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
drivers/block/skd_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index 9199c93..eb6e1e0 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -5269,7 +5269,7 @@ const char *skd_skdev_state_to_str(enum skd_drvr_state state)
}
}
-const char *skd_skmsg_state_to_str(enum skd_fit_msg_state state)
+static const char *skd_skmsg_state_to_str(enum skd_fit_msg_state state)
{
switch (state) {
case SKD_MSG_STATE_IDLE:
@@ -5281,7 +5281,7 @@ const char *skd_skmsg_state_to_str(enum skd_fit_msg_state state)
}
}
-const char *skd_skreq_state_to_str(enum skd_req_state state)
+static const char *skd_skreq_state_to_str(enum skd_req_state state)
{
switch (state) {
case SKD_REQ_STATE_IDLE:
--
1.7.9.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 02/13] drivers: block: Remove unused function drbd_bm_write_lazy() in drbd_bitmap.c
2013-12-19 9:32 [PATCH 01/13] drivers: block: Mark the functions as static in skd_main.c Rashika Kheria
@ 2013-12-19 9:33 ` Rashika Kheria
2013-12-19 9:34 ` [PATCH 03/13] drivers: block: Mark function seq_printf_with_thousands_grouping() as static in drbd_proc.c Rashika Kheria
` (11 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Rashika Kheria @ 2013-12-19 9:33 UTC (permalink / raw)
To: linux-kernel; +Cc: Lars Ellenberg, drbd-user, josh
Remove unused function drbd_bm_write_lazy() in drbd/drbd_bitmap.c.
This eliminates the following warning in drbd/drbd_bitmap.c:
drivers/block/drbd/drbd_bitmap.c:1208:5: warning: no previous prototype for ‘drbd_bm_write_lazy’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
drivers/block/drbd/drbd_bitmap.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c
index b12c11e..d8e2bf4 100644
--- a/drivers/block/drbd/drbd_bitmap.c
+++ b/drivers/block/drbd/drbd_bitmap.c
@@ -1201,16 +1201,6 @@ int drbd_bm_write_all(struct drbd_conf *mdev) __must_hold(local)
}
/**
- * drbd_bm_lazy_write_out() - Write bitmap pages 0 to @upper_idx-1, if they have changed.
- * @mdev: DRBD device.
- * @upper_idx: 0: write all changed pages; +ve: page index to stop scanning for changed pages
- */
-int drbd_bm_write_lazy(struct drbd_conf *mdev, unsigned upper_idx) __must_hold(local)
-{
- return bm_rw(mdev, WRITE, BM_AIO_COPY_PAGES, upper_idx);
-}
-
-/**
* drbd_bm_write_copy_pages() - Write the whole bitmap to its on disk location.
* @mdev: DRBD device.
*
--
1.7.9.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 03/13] drivers: block: Mark function seq_printf_with_thousands_grouping() as static in drbd_proc.c
2013-12-19 9:32 [PATCH 01/13] drivers: block: Mark the functions as static in skd_main.c Rashika Kheria
2013-12-19 9:33 ` [PATCH 02/13] drivers: block: Remove unused function drbd_bm_write_lazy() in drbd_bitmap.c Rashika Kheria
@ 2013-12-19 9:34 ` Rashika Kheria
2013-12-19 9:36 ` [PATCH 04/13] drivers: block: Mark the function as static in drbd_worker.c Rashika Kheria
` (10 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Rashika Kheria @ 2013-12-19 9:34 UTC (permalink / raw)
To: linux-kernel; +Cc: Lars Ellenberg, drbd-user, josh
Mark function seq_printf_with_thousands_grouping() as static in
drbd/drbd_proc.c because it is not used outside this file.
This eliminates the following warning in drbd/drbd_proc.c:
drivers/block/drbd/drbd_proc.c:49:6: warning: no previous prototype for ‘seq_printf_with_thousands_grouping’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
drivers/block/drbd/drbd_proc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/drbd/drbd_proc.c b/drivers/block/drbd/drbd_proc.c
index bf31d41..84fbe33 100644
--- a/drivers/block/drbd/drbd_proc.c
+++ b/drivers/block/drbd/drbd_proc.c
@@ -46,7 +46,7 @@ const struct file_operations drbd_proc_fops = {
.release = drbd_proc_release,
};
-void seq_printf_with_thousands_grouping(struct seq_file *seq, long v)
+static void seq_printf_with_thousands_grouping(struct seq_file *seq, long v)
{
/* v is in kB/sec. We don't expect TiByte/sec yet. */
if (unlikely(v >= 1000000)) {
--
1.7.9.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 04/13] drivers: block: Mark the function as static in drbd_worker.c
2013-12-19 9:32 [PATCH 01/13] drivers: block: Mark the functions as static in skd_main.c Rashika Kheria
2013-12-19 9:33 ` [PATCH 02/13] drivers: block: Remove unused function drbd_bm_write_lazy() in drbd_bitmap.c Rashika Kheria
2013-12-19 9:34 ` [PATCH 03/13] drivers: block: Mark function seq_printf_with_thousands_grouping() as static in drbd_proc.c Rashika Kheria
@ 2013-12-19 9:36 ` Rashika Kheria
2013-12-19 9:37 ` [PATCH 05/13] drivers: block: Move prototype declaration to appropriate header file from drbd_main.c Rashika Kheria
` (9 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Rashika Kheria @ 2013-12-19 9:36 UTC (permalink / raw)
To: linux-kernel; +Cc: Lars Ellenberg, drbd-user, josh
Mark functions drbd_endio_read_sec_final(), drbd_send_barrier(),
need_to_send_barrier(), dequeue_work_batch(), dequeue_work_item() and
wait_for_work() as static in drbd/drbd_worker.c because they are not
used outside this file.
This eliminates the following warnings in drbd/drbd_worker.c:
drivers/block/drbd/drbd_worker.c:99:6: warning: no previous prototype for ‘drbd_endio_read_sec_final’ [-Wmissing-prototypes]
drivers/block/drbd/drbd_worker.c:1276:5: warning: no previous prototype for ‘drbd_send_barrier’ [-Wmissing-prototypes]
drivers/block/drbd/drbd_worker.c:1774:6: warning: no previous prototype for ‘need_to_send_barrier’ [-Wmissing-prototypes]
drivers/block/drbd/drbd_worker.c:1798:6: warning: no previous prototype for ‘dequeue_work_batch’ [-Wmissing-prototypes]
drivers/block/drbd/drbd_worker.c:1806:6: warning: no previous prototype for ‘dequeue_work_item’ [-Wmissing-prototypes]
drivers/block/drbd/drbd_worker.c:1815:6: warning: no previous prototype for ‘wait_for_work’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
drivers/block/drbd/drbd_worker.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c
index 891c0ec..2733ae3 100644
--- a/drivers/block/drbd/drbd_worker.c
+++ b/drivers/block/drbd/drbd_worker.c
@@ -96,7 +96,7 @@ void drbd_md_io_complete(struct bio *bio, int error)
/* reads on behalf of the partner,
* "submitted" by the receiver
*/
-void drbd_endio_read_sec_final(struct drbd_peer_request *peer_req) __releases(local)
+static void drbd_endio_read_sec_final(struct drbd_peer_request *peer_req) __releases(local)
{
unsigned long flags = 0;
struct drbd_conf *mdev = peer_req->w.mdev;
@@ -1273,7 +1273,7 @@ int w_prev_work_done(struct drbd_work *w, int cancel)
* and to be able to wait for them.
* See also comment in drbd_adm_attach before drbd_suspend_io.
*/
-int drbd_send_barrier(struct drbd_tconn *tconn)
+static int drbd_send_barrier(struct drbd_tconn *tconn)
{
struct p_barrier *p;
struct drbd_socket *sock;
@@ -1771,7 +1771,7 @@ void drbd_start_resync(struct drbd_conf *mdev, enum drbd_conns side)
* (because we have not yet seen new requests), we should send the
* corresponding barrier now. Must be checked within the same spinlock
* that is used to check for new requests. */
-bool need_to_send_barrier(struct drbd_tconn *connection)
+static bool need_to_send_barrier(struct drbd_tconn *connection)
{
if (!connection->send.seen_any_write_yet)
return false;
@@ -1795,7 +1795,7 @@ bool need_to_send_barrier(struct drbd_tconn *connection)
return true;
}
-bool dequeue_work_batch(struct drbd_work_queue *queue, struct list_head *work_list)
+static bool dequeue_work_batch(struct drbd_work_queue *queue, struct list_head *work_list)
{
spin_lock_irq(&queue->q_lock);
list_splice_init(&queue->q, work_list);
@@ -1803,7 +1803,7 @@ bool dequeue_work_batch(struct drbd_work_queue *queue, struct list_head *work_li
return !list_empty(work_list);
}
-bool dequeue_work_item(struct drbd_work_queue *queue, struct list_head *work_list)
+static bool dequeue_work_item(struct drbd_work_queue *queue, struct list_head *work_list)
{
spin_lock_irq(&queue->q_lock);
if (!list_empty(&queue->q))
@@ -1812,7 +1812,7 @@ bool dequeue_work_item(struct drbd_work_queue *queue, struct list_head *work_lis
return !list_empty(work_list);
}
-void wait_for_work(struct drbd_tconn *connection, struct list_head *work_list)
+static void wait_for_work(struct drbd_tconn *connection, struct list_head *work_list)
{
DEFINE_WAIT(wait);
struct net_conf *nc;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 05/13] drivers: block: Move prototype declaration to appropriate header file from drbd_main.c
2013-12-19 9:32 [PATCH 01/13] drivers: block: Mark the functions as static in skd_main.c Rashika Kheria
` (2 preceding siblings ...)
2013-12-19 9:36 ` [PATCH 04/13] drivers: block: Mark the function as static in drbd_worker.c Rashika Kheria
@ 2013-12-19 9:37 ` Rashika Kheria
2013-12-19 9:41 ` [PATCH 06/13] drivers: block: Mark functions as static in drbd_receiver.c Rashika Kheria
` (8 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Rashika Kheria @ 2013-12-19 9:37 UTC (permalink / raw)
To: linux-kernel; +Cc: Lars Ellenberg, drbd-user, josh
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@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
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
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 06/13] drivers: block: Mark functions as static in drbd_receiver.c
2013-12-19 9:32 [PATCH 01/13] drivers: block: Mark the functions as static in skd_main.c Rashika Kheria
` (3 preceding siblings ...)
2013-12-19 9:37 ` [PATCH 05/13] drivers: block: Move prototype declaration to appropriate header file from drbd_main.c Rashika Kheria
@ 2013-12-19 9:41 ` Rashika Kheria
2013-12-19 9:42 ` [PATCH 07/13] drivers: block: Mark functions as static in drbd_req.c Rashika Kheria
` (7 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Rashika Kheria @ 2013-12-19 9:41 UTC (permalink / raw)
To: linux-kernel; +Cc: Lars Ellenberg, drbd-user, josh
Mark functions conn_wait_active_ee_empty() and
drbd_crypto_alloc_digest_safe() as static in drbd/drbd_receiver.c
because they are not used outside this file.
This eliminates the following warning in drbd/drbd_receiver.c:
drivers/block/drbd/drbd_receiver.c:1401:6: warning: no previous prototype for ‘conn_wait_active_ee_empty’ [-Wmissing-prototypes]
drivers/block/drbd/drbd_receiver.c:3259:21: warning: no previous prototype for ‘drbd_crypto_alloc_digest_safe’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
drivers/block/drbd/drbd_receiver.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 6fa6673..c31c7a2 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -1398,7 +1398,7 @@ static void drbd_remove_epoch_entry_interval(struct drbd_conf *mdev,
wake_up(&mdev->misc_wait);
}
-void conn_wait_active_ee_empty(struct drbd_tconn *tconn)
+static void conn_wait_active_ee_empty(struct drbd_tconn *tconn)
{
struct drbd_conf *mdev;
int vnr;
@@ -3256,6 +3256,7 @@ disconnect:
* return: NULL (alg name was "")
* ERR_PTR(error) if something goes wrong
* or the crypto hash ptr, if it worked out ok. */
+static
struct crypto_hash *drbd_crypto_alloc_digest_safe(const struct drbd_conf *mdev,
const char *alg, const char *name)
{
--
1.7.9.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 07/13] drivers: block: Mark functions as static in drbd_req.c
2013-12-19 9:32 [PATCH 01/13] drivers: block: Mark the functions as static in skd_main.c Rashika Kheria
` (4 preceding siblings ...)
2013-12-19 9:41 ` [PATCH 06/13] drivers: block: Mark functions as static in drbd_receiver.c Rashika Kheria
@ 2013-12-19 9:42 ` Rashika Kheria
2013-12-19 9:43 ` [PATCH 08/13] drivers: block: Mark function as static in drbd_actlog.c Rashika Kheria
` (6 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Rashika Kheria @ 2013-12-19 9:42 UTC (permalink / raw)
To: linux-kernel; +Cc: Lars Ellenberg, drbd-user, josh
Mark functions drbd_request_prepare() and find_oldest_request() as
static in drbd/drbd_req.c because they are not used outside this file.
This eliminates the following warnings in drbd/drbd_req.c:
drivers/block/drbd/drbd_req.c:1037:1: warning: no previous prototype for ‘drbd_request_prepare’ [-Wmissing-prototypes]
drivers/block/drbd/drbd_req.c:1323:22: warning: no previous prototype for ‘find_oldest_request’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
drivers/block/drbd/drbd_req.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index fec7bef..771697b 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -1033,7 +1033,7 @@ static void drbd_queue_write(struct drbd_conf *mdev, struct drbd_request *req)
* request on the submitter thread.
* Returns ERR_PTR(-ENOMEM) if we cannot allocate a drbd_request.
*/
-struct drbd_request *
+static struct drbd_request *
drbd_request_prepare(struct drbd_conf *mdev, struct bio *bio, unsigned long start_time)
{
const int rw = bio_data_dir(bio);
@@ -1320,7 +1320,7 @@ int drbd_merge_bvec(struct request_queue *q, struct bvec_merge_data *bvm, struct
return limit;
}
-struct drbd_request *find_oldest_request(struct drbd_tconn *tconn)
+static struct drbd_request *find_oldest_request(struct drbd_tconn *tconn)
{
/* Walk the transfer log,
* and find the oldest not yet completed request */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 08/13] drivers: block: Mark function as static in drbd_actlog.c
2013-12-19 9:32 [PATCH 01/13] drivers: block: Mark the functions as static in skd_main.c Rashika Kheria
` (5 preceding siblings ...)
2013-12-19 9:42 ` [PATCH 07/13] drivers: block: Mark functions as static in drbd_req.c Rashika Kheria
@ 2013-12-19 9:43 ` Rashika Kheria
2013-12-19 9:45 ` [PATCH 09/13] drivers: block: Move prototype declaration of function tl_abort_disk_io() to appropriate header file from drbd_state.c Rashika Kheria
` (5 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Rashika Kheria @ 2013-12-19 9:43 UTC (permalink / raw)
To: linux-kernel; +Cc: Lars Ellenberg, drbd-user, josh
Mark the function drbd_al_begin_io_prepare() as static in
drbd/drbd_actlog.c because it is not used outside this file.
This eliminates the following warnings in drbd/drbd_actlog.c:
drivers/block/drbd/drbd_actlog.c:277:6: warning: no previous prototype for ‘drbd_al_begin_io_prepare’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
drivers/block/drbd/drbd_actlog.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c
index 28c73ca..7ba73c4 100644
--- a/drivers/block/drbd/drbd_actlog.c
+++ b/drivers/block/drbd/drbd_actlog.c
@@ -274,6 +274,7 @@ bool drbd_al_begin_io_fastpath(struct drbd_conf *mdev, struct drbd_interval *i)
return _al_get(mdev, first, true);
}
+static
bool drbd_al_begin_io_prepare(struct drbd_conf *mdev, struct drbd_interval *i)
{
/* for bios crossing activity log extent boundaries,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 09/13] drivers: block: Move prototype declaration of function tl_abort_disk_io() to appropriate header file from drbd_state.c
2013-12-19 9:32 [PATCH 01/13] drivers: block: Mark the functions as static in skd_main.c Rashika Kheria
` (6 preceding siblings ...)
2013-12-19 9:43 ` [PATCH 08/13] drivers: block: Mark function as static in drbd_actlog.c Rashika Kheria
@ 2013-12-19 9:45 ` Rashika Kheria
2013-12-19 9:46 ` [PATCH 10/13] drivers: block: Mark functions as static in drbd_main.c Rashika Kheria
` (4 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Rashika Kheria @ 2013-12-19 9:45 UTC (permalink / raw)
To: linux-kernel; +Cc: Lars Ellenberg, drbd-user, josh
Move the prototype declaration of function tl_abort_disk_io() from
drbd/drbd_state.c to appropriate header file drbd/drbd_int.h because it
is used by more than 2 files.
This eliminates the following warnings in drbd/drbd_main.c:
drivers/block/drbd/drbd_main.c:310:6: warning: no previous prototype for ‘tl_abort_disk_io’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
drivers/block/drbd/drbd_int.h | 1 +
drivers/block/drbd/drbd_state.c | 3 ---
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index 0cc79f4..27df55f 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -65,6 +65,7 @@
extern unsigned int minor_count;
extern bool disable_sendpage;
extern bool allow_oos;
+void tl_abort_disk_io(struct drbd_conf *mdev);
#ifdef CONFIG_DRBD_FAULT_INJECTION
extern int enable_faults;
diff --git a/drivers/block/drbd/drbd_state.c b/drivers/block/drbd/drbd_state.c
index 216d47b..120e1c0 100644
--- a/drivers/block/drbd/drbd_state.c
+++ b/drivers/block/drbd/drbd_state.c
@@ -29,9 +29,6 @@
#include "drbd_int.h"
#include "drbd_req.h"
-/* in drbd_main.c */
-extern void tl_abort_disk_io(struct drbd_conf *mdev);
-
struct after_state_chg_work {
struct drbd_work w;
union drbd_state os;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 10/13] drivers: block: Mark functions as static in drbd_main.c
2013-12-19 9:32 [PATCH 01/13] drivers: block: Mark the functions as static in skd_main.c Rashika Kheria
` (7 preceding siblings ...)
2013-12-19 9:45 ` [PATCH 09/13] drivers: block: Move prototype declaration of function tl_abort_disk_io() to appropriate header file from drbd_state.c Rashika Kheria
@ 2013-12-19 9:46 ` Rashika Kheria
2013-12-19 9:47 ` [PATCH 11/13] drivers: block: Mark functions as static in drbd_nl.c Rashika Kheria
` (3 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Rashika Kheria @ 2013-12-19 9:46 UTC (permalink / raw)
To: linux-kernel; +Cc: Lars Ellenberg, drbd-user, josh
Mark functions _drbd_send_uuids(), fill_bitmap_rle_bits() and
init_submitter() as static in drbd/drbd_main.c because they are
not used outside this file.
This eliminates the following warnings in drbd/drbd_main.c:
drivers/block/drbd/drbd_main.c:826:5: warning: no previous prototype for ‘_drbd_send_uuids’ [-Wmissing-prototypes]
drivers/block/drbd/drbd_main.c:1070:5: warning: no previous prototype for ‘fill_bitmap_rle_bits’ [-Wmissing-prototypes]
drivers/block/drbd/drbd_main.c:2592:5: warning: no previous prototype for ‘init_submitter’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
drivers/block/drbd/drbd_main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 4a24e71..3cc0997 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -821,7 +821,7 @@ int drbd_send_protocol(struct drbd_tconn *tconn)
return err;
}
-int _drbd_send_uuids(struct drbd_conf *mdev, u64 uuid_flags)
+static int _drbd_send_uuids(struct drbd_conf *mdev, u64 uuid_flags)
{
struct drbd_socket *sock;
struct p_uuids *p;
@@ -1065,7 +1065,7 @@ static void dcbp_set_pad_bits(struct p_compressed_bm *p, int n)
p->encoding = (p->encoding & (~0x7 << 4)) | (n << 4);
}
-int fill_bitmap_rle_bits(struct drbd_conf *mdev,
+static int fill_bitmap_rle_bits(struct drbd_conf *mdev,
struct p_compressed_bm *p,
unsigned int size,
struct bm_xfer_ctx *c)
@@ -2587,7 +2587,7 @@ void conn_destroy(struct kref *kref)
kfree(tconn);
}
-int init_submitter(struct drbd_conf *mdev)
+static int init_submitter(struct drbd_conf *mdev)
{
/* opencoded create_singlethread_workqueue(),
* to be able to say "drbd%d", ..., minor */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 11/13] drivers: block: Mark functions as static in drbd_nl.c
2013-12-19 9:32 [PATCH 01/13] drivers: block: Mark the functions as static in skd_main.c Rashika Kheria
` (8 preceding siblings ...)
2013-12-19 9:46 ` [PATCH 10/13] drivers: block: Mark functions as static in drbd_main.c Rashika Kheria
@ 2013-12-19 9:47 ` Rashika Kheria
2013-12-19 9:48 ` [PATCH 12/13] drivers: block: Mark function as static in drbd_state.c Rashika Kheria
` (2 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Rashika Kheria @ 2013-12-19 9:47 UTC (permalink / raw)
To: linux-kernel; +Cc: Lars Ellenberg, drbd-user, josh
Mark functions conn_khelper(), nla_put_drbd_cfg_context(),
nla_put_status_info() and get_one_status() as static in drbd/drbd_nl.c
because they are not used outside this file.
This eliminates the following warnings in drbd/drbd_nl.c:
drivers/block/drbd/drbd_nl.c:365:5: warning: no previous prototype for ‘conn_khelper’ [-Wmissing-prototypes]
drivers/block/drbd/drbd_nl.c:2727:5: warning: no previous prototype for ‘nla_put_drbd_cfg_context’ [-Wmissing-prototypes]
drivers/block/drbd/drbd_nl.c:2753:5: warning: no previous prototype for ‘nla_put_status_info’ [-Wmissing-prototypes]
drivers/block/drbd/drbd_nl.c:2895:5: warning: no previous prototype for ‘get_one_status’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
drivers/block/drbd/drbd_nl.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index c706d50..4c00837 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -362,7 +362,7 @@ int drbd_khelper(struct drbd_conf *mdev, char *cmd)
return ret;
}
-int conn_khelper(struct drbd_tconn *tconn, char *cmd)
+static int conn_khelper(struct drbd_tconn *tconn, char *cmd)
{
char *envp[] = { "HOME=/",
"TERM=linux",
@@ -2724,7 +2724,8 @@ int drbd_adm_outdate(struct sk_buff *skb, struct genl_info *info)
return drbd_adm_simple_request_state(skb, info, NS(disk, D_OUTDATED));
}
-int nla_put_drbd_cfg_context(struct sk_buff *skb, struct drbd_tconn *tconn, unsigned vnr)
+static int nla_put_drbd_cfg_context(struct sk_buff *skb,
+ struct drbd_tconn *tconn, unsigned vnr)
{
struct nlattr *nla;
nla = nla_nest_start(skb, DRBD_NLA_CFG_CONTEXT);
@@ -2750,7 +2751,7 @@ nla_put_failure:
return -EMSGSIZE;
}
-int nla_put_status_info(struct sk_buff *skb, struct drbd_conf *mdev,
+static int nla_put_status_info(struct sk_buff *skb, struct drbd_conf *mdev,
const struct sib_info *sib)
{
struct state_info *si = NULL; /* for sizeof(si->member); */
@@ -2892,7 +2893,7 @@ out:
return 0;
}
-int get_one_status(struct sk_buff *skb, struct netlink_callback *cb)
+static int get_one_status(struct sk_buff *skb, struct netlink_callback *cb)
{
struct drbd_conf *mdev;
struct drbd_genlmsghdr *dh;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 12/13] drivers: block: Mark function as static in drbd_state.c
2013-12-19 9:32 [PATCH 01/13] drivers: block: Mark the functions as static in skd_main.c Rashika Kheria
` (9 preceding siblings ...)
2013-12-19 9:47 ` [PATCH 11/13] drivers: block: Mark functions as static in drbd_nl.c Rashika Kheria
@ 2013-12-19 9:48 ` Rashika Kheria
2013-12-19 9:52 ` [PATCH 13/13] drivers: block: Remove unused function in genl_magic_func.h Rashika Kheria
2013-12-19 15:07 ` [PATCH 01/13] drivers: block: Mark the functions as static in skd_main.c Jens Axboe
12 siblings, 0 replies; 15+ messages in thread
From: Rashika Kheria @ 2013-12-19 9:48 UTC (permalink / raw)
To: linux-kernel; +Cc: Lars Ellenberg, drbd-user, josh
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@gmail.com>
Reviewed-by: Josh Triplett <josh@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
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 13/13] drivers: block: Remove unused function in genl_magic_func.h
2013-12-19 9:32 [PATCH 01/13] drivers: block: Mark the functions as static in skd_main.c Rashika Kheria
` (10 preceding siblings ...)
2013-12-19 9:48 ` [PATCH 12/13] drivers: block: Mark function as static in drbd_state.c Rashika Kheria
@ 2013-12-19 9:52 ` Rashika Kheria
2013-12-19 9:59 ` Josh Triplett
2013-12-19 15:07 ` [PATCH 01/13] drivers: block: Mark the functions as static in skd_main.c Jens Axboe
12 siblings, 1 reply; 15+ messages in thread
From: Rashika Kheria @ 2013-12-19 9:52 UTC (permalink / raw)
To: linux-kernel; +Cc: David S. Miller, Johannes Berg, Rashika Kheria, josh
Remove unused function CONCAT_(GENL_MAGIC_FAMILY, _genl_cmd_to_str) in
include/linux/genl_magic_func.h.
This eliminates the following warning in
include/linux/genl_magic_func.h:
include/linux/genl_magic_func.h:221:1: warning: no previous prototype for ‘drbd_genl_cmd_to_str’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
include/linux/genl_magic_func.h | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/include/linux/genl_magic_func.h b/include/linux/genl_magic_func.h
index c0894dd..0456ad8 100644
--- a/include/linux/genl_magic_func.h
+++ b/include/linux/genl_magic_func.h
@@ -214,22 +214,6 @@ static int s_name ## _from_attrs_for_change(struct s_name *s, \
#undef GENL_struct
#define GENL_struct(tag_name, tag_number, s_name, s_fields)
-/*
- * Magic: define op number to op name mapping {{{1
- * {{{2
- */
-const char *CONCAT_(GENL_MAGIC_FAMILY, _genl_cmd_to_str)(__u8 cmd)
-{
- switch (cmd) {
-#undef GENL_op
-#define GENL_op(op_name, op_num, handler, tla_list) \
- case op_num: return #op_name;
-#include GENL_MAGIC_INCLUDE_FILE
- default:
- return "unknown";
- }
-}
-
#ifdef __KERNEL__
#include <linux/stringify.h>
/*
--
1.7.9.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 13/13] drivers: block: Remove unused function in genl_magic_func.h
2013-12-19 9:52 ` [PATCH 13/13] drivers: block: Remove unused function in genl_magic_func.h Rashika Kheria
@ 2013-12-19 9:59 ` Josh Triplett
0 siblings, 0 replies; 15+ messages in thread
From: Josh Triplett @ 2013-12-19 9:59 UTC (permalink / raw)
To: Rashika Kheria; +Cc: linux-kernel, David S. Miller, Johannes Berg
On Thu, Dec 19, 2013 at 03:22:10PM +0530, Rashika Kheria wrote:
> Remove unused function CONCAT_(GENL_MAGIC_FAMILY, _genl_cmd_to_str) in
> include/linux/genl_magic_func.h.
>
> This eliminates the following warning in
> include/linux/genl_magic_func.h:
> include/linux/genl_magic_func.h:221:1: warning: no previous prototype for ‘drbd_genl_cmd_to_str’ [-Wmissing-prototypes]
>
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> include/linux/genl_magic_func.h | 16 ----------------
> 1 file changed, 16 deletions(-)
>
> diff --git a/include/linux/genl_magic_func.h b/include/linux/genl_magic_func.h
> index c0894dd..0456ad8 100644
> --- a/include/linux/genl_magic_func.h
> +++ b/include/linux/genl_magic_func.h
> @@ -214,22 +214,6 @@ static int s_name ## _from_attrs_for_change(struct s_name *s, \
> #undef GENL_struct
> #define GENL_struct(tag_name, tag_number, s_name, s_fields)
>
> -/*
> - * Magic: define op number to op name mapping {{{1
> - * {{{2
> - */
> -const char *CONCAT_(GENL_MAGIC_FAMILY, _genl_cmd_to_str)(__u8 cmd)
> -{
> - switch (cmd) {
> -#undef GENL_op
> -#define GENL_op(op_name, op_num, handler, tla_list) \
> - case op_num: return #op_name;
> -#include GENL_MAGIC_INCLUDE_FILE
> - default:
> - return "unknown";
> - }
> -}
> -
> #ifdef __KERNEL__
> #include <linux/stringify.h>
> /*
> --
> 1.7.9.5
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 01/13] drivers: block: Mark the functions as static in skd_main.c
2013-12-19 9:32 [PATCH 01/13] drivers: block: Mark the functions as static in skd_main.c Rashika Kheria
` (11 preceding siblings ...)
2013-12-19 9:52 ` [PATCH 13/13] drivers: block: Remove unused function in genl_magic_func.h Rashika Kheria
@ 2013-12-19 15:07 ` Jens Axboe
12 siblings, 0 replies; 15+ messages in thread
From: Jens Axboe @ 2013-12-19 15:07 UTC (permalink / raw)
To: Rashika Kheria
Cc: linux-kernel, Bartlomiej Zolnierkiewicz, Kyungmin Park,
Ramprasad Chinthekindi, Akhil Bhansali, josh
On Thu, Dec 19 2013, Rashika Kheria wrote:
> Mark functions skd_skmsg_state_to_str() and skd_skreq_state_to_str() as
> static in skd_main.c because they are not used outside this file.
>
> This eliminates the following warnings in skd_main.c:
> drivers/block/skd_main.c:5272:13: warning: no previous prototype for ‘skd_skmsg_state_to_str’ [-Wmissing-prototypes]
> drivers/block/skd_main.c:5284:13: warning: no previous prototype for ‘skd_skreq_state_to_str’ [-Wmissing-prototypes]
Thanks, applied.
--
Jens Axboe
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2013-12-19 15:07 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-19 9:32 [PATCH 01/13] drivers: block: Mark the functions as static in skd_main.c Rashika Kheria
2013-12-19 9:33 ` [PATCH 02/13] drivers: block: Remove unused function drbd_bm_write_lazy() in drbd_bitmap.c Rashika Kheria
2013-12-19 9:34 ` [PATCH 03/13] drivers: block: Mark function seq_printf_with_thousands_grouping() as static in drbd_proc.c Rashika Kheria
2013-12-19 9:36 ` [PATCH 04/13] drivers: block: Mark the function as static in drbd_worker.c Rashika Kheria
2013-12-19 9:37 ` [PATCH 05/13] drivers: block: Move prototype declaration to appropriate header file from drbd_main.c Rashika Kheria
2013-12-19 9:41 ` [PATCH 06/13] drivers: block: Mark functions as static in drbd_receiver.c Rashika Kheria
2013-12-19 9:42 ` [PATCH 07/13] drivers: block: Mark functions as static in drbd_req.c Rashika Kheria
2013-12-19 9:43 ` [PATCH 08/13] drivers: block: Mark function as static in drbd_actlog.c Rashika Kheria
2013-12-19 9:45 ` [PATCH 09/13] drivers: block: Move prototype declaration of function tl_abort_disk_io() to appropriate header file from drbd_state.c Rashika Kheria
2013-12-19 9:46 ` [PATCH 10/13] drivers: block: Mark functions as static in drbd_main.c Rashika Kheria
2013-12-19 9:47 ` [PATCH 11/13] drivers: block: Mark functions as static in drbd_nl.c Rashika Kheria
2013-12-19 9:48 ` [PATCH 12/13] drivers: block: Mark function as static in drbd_state.c Rashika Kheria
2013-12-19 9:52 ` [PATCH 13/13] drivers: block: Remove unused function in genl_magic_func.h Rashika Kheria
2013-12-19 9:59 ` Josh Triplett
2013-12-19 15:07 ` [PATCH 01/13] drivers: block: Mark the functions as static in skd_main.c Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).