[Drbd-dev] [patch 1/1] drbd: fix warning

akpm at linux-foundation.org akpm at linux-foundation.org
Tue May 24 00:29:32 CEST 2011


From: Andrew Morton <akpm at linux-foundation.org>

In file included from drivers/block/drbd/drbd_main.c:54:                        drivers/block/drbd/drbd_int.h:1190: warning: parameter has incomplete type

Forward declarations of enums do not work.

Fix it unpleasantly by moving the prototype.

Cc: Lars Ellenberg <drbd-dev at lists.linbit.com>
Cc: Philipp Reisner <philipp.reisner at linbit.com>
Cc: Jens Axboe <axboe at kernel.dk>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
---

 drivers/block/drbd/drbd_int.h |    2 --
 drivers/block/drbd/drbd_req.h |    1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff -puN drivers/block/drbd/drbd_int.h~drbd-fix-warning drivers/block/drbd/drbd_int.h
--- a/drivers/block/drbd/drbd_int.h~drbd-fix-warning
+++ a/drivers/block/drbd/drbd_int.h
@@ -1218,8 +1218,6 @@ extern void drbd_free_resources(struct d
 extern void tl_release(struct drbd_conf *mdev, unsigned int barrier_nr,
 		       unsigned int set_size);
 extern void tl_clear(struct drbd_conf *mdev);
-enum drbd_req_event;
-extern void tl_restart(struct drbd_conf *mdev, enum drbd_req_event what);
 extern void _tl_add_barrier(struct drbd_conf *, struct drbd_tl_epoch *);
 extern void drbd_free_sock(struct drbd_conf *mdev);
 extern int drbd_send(struct drbd_conf *mdev, struct socket *sock,
diff -puN drivers/block/drbd/drbd_req.h~drbd-fix-warning drivers/block/drbd/drbd_req.h
--- a/drivers/block/drbd/drbd_req.h~drbd-fix-warning
+++ a/drivers/block/drbd/drbd_req.h
@@ -323,6 +323,7 @@ extern int __req_mod(struct drbd_request
 extern void complete_master_bio(struct drbd_conf *mdev,
 		struct bio_and_error *m);
 extern void request_timer_fn(unsigned long data);
+extern void tl_restart(struct drbd_conf *mdev, enum drbd_req_event what);
 
 /* use this if you don't want to deal with calling complete_master_bio()
  * outside the spinlock, e.g. when walking some list on cleanup. */
_


More information about the drbd-dev mailing list