[DRBD-cvs] svn commit by lars - r2994 - in branches/drbd-8.0-for-linus/drbd: . linux - 3da7dab9c86db93c16b742119734fd2f60a59d1e and even more

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Tue Jul 24 15:35:49 CEST 2007


Author: lars
Date: 2007-07-24 15:35:47 +0200 (Tue, 24 Jul 2007)
New Revision: 2994

Modified:
   branches/drbd-8.0-for-linus/drbd/drbd_bitmap.c
   branches/drbd-8.0-for-linus/drbd/drbd_int.h
   branches/drbd-8.0-for-linus/drbd/drbd_main.c
   branches/drbd-8.0-for-linus/drbd/drbd_nl.c
   branches/drbd-8.0-for-linus/drbd/drbd_receiver.c
   branches/drbd-8.0-for-linus/drbd/drbd_req.c
   branches/drbd-8.0-for-linus/drbd/drbd_strings.c
   branches/drbd-8.0-for-linus/drbd/drbd_worker.c
   branches/drbd-8.0-for-linus/drbd/linux/drbd_tag_magic.h
Log:
3da7dab9c86db93c16b742119734fd2f60a59d1e and even more whitespace fixes; no more initialising to 0 or NULL; no more assignments in if (...)
5554f5d5101ab68150361579866517fc1128a32a unindent labels


Modified: branches/drbd-8.0-for-linus/drbd/drbd_bitmap.c
===================================================================
--- branches/drbd-8.0-for-linus/drbd/drbd_bitmap.c	2007-07-24 13:25:49 UTC (rev 2993)
+++ branches/drbd-8.0-for-linus/drbd/drbd_bitmap.c	2007-07-24 13:35:47 UTC (rev 2994)
@@ -264,7 +264,8 @@
 	while ( bm < ep ) {
 		/* on little endian, this is *bm = *bm;
 		 * and should be optimized away by the compiler */
-		if (just_read) *bm = lel_to_cpu(*bm);
+		if (just_read)
+			*bm = lel_to_cpu(*bm);
 		bits += hweight_long(*bm++);
 	}
 
@@ -384,7 +385,8 @@
 		b->bm_words = words;
 		b->bm_dev_capacity = capacity;
 		bm_clear_surplus(b);
-		if (!growing) b->bm_set = bm_count_bits(b, 0);
+		if (!growing)
+			b->bm_set = bm_count_bits(b, 0);
 		bm_end_info(mdev, __FUNCTION__ );
 		spin_unlock_irq(&b->bm_lock);
 		INFO("resync bitmap: bits=%lu words=%lu\n", bits, words);

Modified: branches/drbd-8.0-for-linus/drbd/drbd_int.h
===================================================================
--- branches/drbd-8.0-for-linus/drbd/drbd_int.h	2007-07-24 13:25:49 UTC (rev 2993)
+++ branches/drbd-8.0-for-linus/drbd/drbd_int.h	2007-07-24 13:35:47 UTC (rev 2994)
@@ -1264,7 +1264,8 @@
 /* Bio printing support */
 extern void _dump_bio(drbd_dev *mdev, struct bio *bio, int complete);
 
-static inline void dump_bio(drbd_dev *mdev, struct bio *bio, int complete) {
+static inline void dump_bio(drbd_dev *mdev, struct bio *bio, int complete)
+{
 	MTRACE(TraceTypeRq, TraceLvlSummary,
 	       _dump_bio(mdev, bio, complete);
 		);
@@ -1607,12 +1608,14 @@
 	spin_unlock_irqrestore(&q->q_lock, flags);
 }
 
-static inline void wake_asender(drbd_dev *mdev) {
+static inline void wake_asender(drbd_dev *mdev)
+{
 	if (test_bit(SIGNAL_ASENDER, &mdev->flags))
 		force_sig(DRBD_SIG, mdev->asender.task);
 }
 
-static inline void request_ping(drbd_dev *mdev) {
+static inline void request_ping(drbd_dev *mdev)
+{
 	set_bit(SEND_PING, &mdev->flags);
 	wake_asender(mdev);
 }
@@ -1679,7 +1682,7 @@
 }
 
 #define ERR_IF_CNT_IS_NEGATIVE(which)				\
-	if (atomic_read(&mdev->which) < 0)				\
+	if (atomic_read(&mdev->which) < 0)			\
 		ERR("in %s:%d: " #which " = %d < 0 !\n",	\
 		    __func__ , __LINE__ ,			\
 		    atomic_read(&mdev->which))
@@ -1795,7 +1798,8 @@
 	return mxb;
 }
 
-static inline int __inc_ap_bio_cond(drbd_dev *mdev) {
+static inline int __inc_ap_bio_cond(drbd_dev *mdev)
+{
 	int mxb = drbd_get_max_buffers(mdev);
 	if (mdev->state.susp) return 0;
 	if (mdev->state.conn == WFBitMapS) return 0;

Modified: branches/drbd-8.0-for-linus/drbd/drbd_main.c
===================================================================
--- branches/drbd-8.0-for-linus/drbd/drbd_main.c	2007-07-24 13:25:49 UTC (rev 2993)
+++ branches/drbd-8.0-for-linus/drbd/drbd_main.c	2007-07-24 13:35:47 UTC (rev 2994)
@@ -89,7 +89,7 @@
 module_param(allow_oos, int, 0);
 
 #ifdef DRBD_ENABLE_FAULTS
-int enable_faults = 0;
+int enable_faults;
 int fault_rate;
 int fault_count;
 int fault_devs;
@@ -101,12 +101,12 @@
 
 /* module parameter, defined */
 int minor_count = 32;
-int allow_oos = 0;
+int allow_oos;
 
 #ifdef ENABLE_DYNAMIC_TRACE
-int trace_type  = 0;	/* Bitmap of trace types to enable */
-int trace_level = 0;	/* Current trace level */
-int trace_devs  = 0;	/* Bitmap of devices to trace */
+int trace_type;		/* Bitmap of trace types to enable */
+int trace_level;	/* Current trace level */
+int trace_devs;		/* Bitmap of devices to trace */
 
 module_param(trace_level, int, 0644);
 module_param(trace_type, int, 0644);
@@ -125,7 +125,7 @@
 /* in 2.6.x, our device mapping and config info contains our virtual gendisks
  * as member "struct gendisk *vdisk;"
  */
-struct Drbd_Conf **minor_table = NULL;
+struct Drbd_Conf **minor_table;
 
 struct kmem_cache *drbd_request_cache;
 struct kmem_cache *drbd_ee_cache;
@@ -335,8 +335,10 @@
 	if (!send) return ok;
 
 	ok = drbd_send_state(mdev);
-	if (ok) WARN("Notified peer that my disk is broken.\n");
-	else ERR("Sending state in drbd_io_error() failed\n");
+	if (ok)
+		WARN("Notified peer that my disk is broken.\n");
+	else
+		ERR("Sending state in drbd_io_error() failed\n");
 
 	/* Make sure we try to flush meta-data to disk - we come
 	 * in here because of a local disk error so it might fail
@@ -443,7 +445,8 @@
 
 	if (cl_wide_st_chg(mdev, os, ns)) {
 		rv = is_valid_state(mdev, ns);
-		if (rv == SS_Success) rv = is_valid_state_transition(mdev, ns, os);
+		if (rv == SS_Success)
+			rv = is_valid_state_transition(mdev, ns, os);
 		spin_unlock_irqrestore(&mdev->req_lock, flags);
 
 		if (rv < SS_Success) {
@@ -722,7 +725,8 @@
 				print_st(mdev, "new", ns);
 				rv = SS_Success;
 			}
-		} else rv = is_valid_state_transition(mdev, ns, os);
+		} else
+			rv = is_valid_state_transition(mdev, ns, os);
 	}
 
 	if (rv < SS_Success) {
@@ -1098,6 +1102,8 @@
 		thi->t_state = Running;
 		spin_unlock(&thi->t_lock);
 		flush_signals(current); /* otherw. may get -ERESTARTNOINTR */
+
+		/* FIXME rewrite to use kthread interface */
 		pid = kernel_thread(drbd_thread_setup, (void *) thi, CLONE_FS);
 		if (pid < 0) {
 			ERR("Couldn't start thread (%d)\n", pid);
@@ -1142,7 +1148,8 @@
 		if (thi->task != current) {
 			if (wait) init_completion(&thi->startstop);
 			force_sig(DRBD_SIGKILL, thi->task);
-		} else D_ASSERT(!wait);
+		} else
+			D_ASSERT(!wait);
 	}
 	spin_unlock(&thi->t_lock);
 
@@ -1567,9 +1574,9 @@
 
 #ifdef SHOW_SENDPAGE_USAGE
 	unsigned long now = jiffies;
-	static unsigned long total = 0;
-	static unsigned long fallback = 0;
-	static unsigned long last_rep = 0;
+	static unsigned long total;
+	static unsigned long fallback;
+	static unsigned long last_rep;
 
 	/* report statistics every hour,
 	 * if we had at least one fallback.
@@ -1714,7 +1721,8 @@
 
 	dump_packet(mdev, mdev->data.socket, 0, (void *)&p, __FILE__, __LINE__);
 	ok = sizeof(p) == drbd_send(mdev, mdev->data.socket, &p, sizeof(p), MSG_MORE);
-	if (ok) ok = _drbd_send_zc_bio(mdev, e->private_bio);
+	if (ok)
+		ok = _drbd_send_zc_bio(mdev, e->private_bio);
 
 	drbd_put_data_sock(mdev);
 	return ok;
@@ -1913,12 +1921,8 @@
 	mdev->sync_conf.after      = DRBD_AFTER_DEF;
 	mdev->sync_conf.rate       = DRBD_RATE_DEF;
 	mdev->sync_conf.al_extents = DRBD_AL_EXTENTS_DEF; /* 512 MB active set */
-	mdev->state = (drbd_state_t){ { Secondary,
-					Unknown,
-					StandAlone,
-					Diskless,
-					DUnknown,
-					0 } };
+	mdev->state = (drbd_state_t) {
+		{ Secondary, Unknown, StandAlone, Diskless, DUnknown, 0 } };
 }
 
 void drbd_init_set_defaults(drbd_dev *mdev)
@@ -2377,7 +2381,8 @@
 	minor_table = kzalloc(sizeof(drbd_dev *)*minor_count, GFP_KERNEL);
 	if (!minor_table) goto Enomem;
 
-	if ((err = drbd_create_mempools()))
+	err = drbd_create_mempools();
+	if (err)
 		goto Enomem;
 
 #if CONFIG_PROC_FS
@@ -2556,7 +2561,7 @@
 	down(&mdev->md_io_mutex);
 	buffer = (struct meta_data_on_disk *)page_address(mdev->md_io_page);
 
-	if ( ! drbd_md_sync_page_io(mdev, bdev, bdev->md.md_offset, READ) ) {
+	if (!drbd_md_sync_page_io(mdev, bdev, bdev->md.md_offset, READ)) {
 		/* NOTE: cant do normal error processing here as this is
 		   called BEFORE disk is attached */
 		ERR("Error while reading metadata.\n");
@@ -2824,7 +2829,8 @@
 
 #ifdef ENABLE_DYNAMIC_TRACE
 
-STATIC char *_drbd_uuid_str(unsigned int idx) {
+STATIC char *_drbd_uuid_str(unsigned int idx)
+{
 	static char *uuid_str[] = {
 		"Current",
 		"Bitmap",
@@ -3020,7 +3026,8 @@
 	} \
 } while (0)
 
-char *_dump_block_id(u64 block_id, char *buff) {
+char *_dump_block_id(u64 block_id, char *buff)
+{
     if (is_syncer_block_id(block_id))
 	strcpy(buff, "SyncerId");
     else

Modified: branches/drbd-8.0-for-linus/drbd/drbd_nl.c
===================================================================
--- branches/drbd-8.0-for-linus/drbd/drbd_nl.c	2007-07-24 13:25:49 UTC (rev 2993)
+++ branches/drbd-8.0-for-linus/drbd/drbd_nl.c	2007-07-24 13:35:47 UTC (rev 2994)
@@ -120,14 +120,15 @@
 void drbd_bcast_ev_helper(drbd_dev *mdev, char *helper_name);
 void drbd_nl_send_reply(struct cn_msg *, int);
 
-char *nl_packet_name(int packet_type) {
+char *nl_packet_name(int packet_type)
+{
 /* Generate packet type strings */
 #define PACKET(name, number, fields) \
 	[ P_ ## name ] = # name,
-#define INTEGER Argh!
-#define BIT Argh!
-#define INT64 Argh!
-#define STRING Argh!
+#define INTEGER Argh !
+#define BIT Argh !
+#define INT64 Argh !
+#define STRING Argh !
 
 	static char *nl_tag_name[P_nl_after_last_packet] = {
 #include "linux/drbd_nl.h"
@@ -137,7 +138,8 @@
 	    nl_tag_name[packet_type] : "*Unknown*";
 }
 
-void nl_trace_packet(void *data) {
+void nl_trace_packet(void *data)
+{
 	struct cn_msg *req = data;
 	struct drbd_nl_cfg_req *nlp = (struct drbd_nl_cfg_req *)req->data;
 
@@ -149,7 +151,8 @@
 	       req->seq, req->ack, req->len);
 }
 
-void nl_trace_reply(void *data) {
+void nl_trace_reply(void *data)
+{
 	struct cn_msg *req = data;
 	struct drbd_nl_cfg_reply *nlp = (struct drbd_nl_cfg_reply *)req->data;
 
@@ -808,7 +811,8 @@
 		goto release_bdev2_fail;
 	}
 
-	if ((retcode = drbd_request_state(mdev, NS(disk, Attaching))) < SS_Success )
+	retcode = drbd_request_state(mdev, NS(disk, Attaching));
+	if (retcode < SS_Success )
 		goto release_bdev2_fail;
 
 	drbd_md_set_sector_offsets(mdev, nbc);
@@ -955,8 +959,10 @@
 	drbd_bm_unlock(mdev);
 
 	if (inc_local_if_state(mdev, Attaching)) {
-		if (mdev->state.role == Primary) mdev->bc->md.uuid[Current] |=	(u64)1;
-		else				mdev->bc->md.uuid[Current] &= ~(u64)1;
+		if (mdev->state.role == Primary)
+			mdev->bc->md.uuid[Current] |=	(u64)1;
+		else
+			mdev->bc->md.uuid[Current] &= ~(u64)1;
 		dec_local(mdev);
 	}
 
@@ -1582,7 +1588,8 @@
 		return;
 	}
 
-	if ( !(mdev = ensure_mdev(nlp)) ) {
+	mdev = ensure_mdev(nlp);
+	if (!mdev) {
 		retcode = MinorNotKnown;
 		goto fail;
 	}
@@ -1597,7 +1604,8 @@
 	cm = cnd_table + nlp->packet_type;
 	reply_size += cm->reply_body_size;
 
-	if ( !(cn_reply = kmalloc(reply_size, GFP_KERNEL)) ) {
+	cn_reply = kmalloc(reply_size, GFP_KERNEL);
+	if (!cn_reply) {
 		retcode = KMallocFailed;
 		goto fail;
 	}
@@ -1639,7 +1647,7 @@
 		    sizeof(struct get_state_tag_len_struct)+
 		    sizeof(short int)];
 	struct cn_msg *cn_reply = (struct cn_msg *) buffer;
-	struct drbd_nl_cfg_reply* reply = (struct drbd_nl_cfg_reply *)cn_reply->data;
+	struct drbd_nl_cfg_reply *reply = (struct drbd_nl_cfg_reply *)cn_reply->data;
 	unsigned short *tl = reply->tag_list;
 
 	/* WARN("drbd_bcast_state() got called\n"); */
@@ -1672,7 +1680,7 @@
 		    sizeof(struct call_helper_tag_len_struct)+
 		    sizeof(short int)];
 	struct cn_msg *cn_reply = (struct cn_msg *) buffer;
-	struct drbd_nl_cfg_reply* reply = (struct drbd_nl_cfg_reply *)cn_reply->data;
+	struct drbd_nl_cfg_reply *reply = (struct drbd_nl_cfg_reply *)cn_reply->data;
 	unsigned short *tl = reply->tag_list;
 	int str_len;
 
@@ -1710,7 +1718,7 @@
 		    sizeof(struct sync_progress_tag_len_struct)+
 		    sizeof(short int)];
 	struct cn_msg *cn_reply = (struct cn_msg *) buffer;
-	struct drbd_nl_cfg_reply* reply = (struct drbd_nl_cfg_reply *)cn_reply->data;
+	struct drbd_nl_cfg_reply *reply = (struct drbd_nl_cfg_reply *)cn_reply->data;
 	unsigned short *tl = reply->tag_list;
 	int res;
 	unsigned long rs_left;
@@ -1794,7 +1802,7 @@
 {
 	char buffer[sizeof(struct cn_msg)+sizeof(struct drbd_nl_cfg_reply)];
 	struct cn_msg *cn_reply = (struct cn_msg *) buffer;
-	struct drbd_nl_cfg_reply* reply = (struct drbd_nl_cfg_reply *)cn_reply->data;
+	struct drbd_nl_cfg_reply *reply = (struct drbd_nl_cfg_reply *)cn_reply->data;
 	int rr;
 
 	cn_reply->id = req->id;

Modified: branches/drbd-8.0-for-linus/drbd/drbd_receiver.c
===================================================================
--- branches/drbd-8.0-for-linus/drbd/drbd_receiver.c	2007-07-24 13:25:49 UTC (rev 2993)
+++ branches/drbd-8.0-for-linus/drbd/drbd_receiver.c	2007-07-24 13:35:47 UTC (rev 2994)
@@ -137,12 +137,14 @@
 	   FIXME but why irq _save_ ?
 	   this is only called from drbd_alloc_ee,
 	   and that is strictly process context! */
-	if ( (page = drbd_pp_pool) ) {
+	page = drbd_pp_pool;
+	if (page) {
 		drbd_pp_pool = (struct page *)page_private(page);
 		drbd_pp_vacant--;
 	}
 	spin_unlock_irqrestore(&drbd_pp_lock, flags);
-	if (page) goto got_page;
+	if (page)
+		goto got_page;
 
 	drbd_kick_lo(mdev);
 
@@ -151,7 +153,8 @@
 
 		/* try the pool again, maybe the drbd_kick_lo set some free */
 		spin_lock_irqsave(&drbd_pp_lock, flags);
-		if ( (page = drbd_pp_pool) ) {
+		page = drbd_pp_pool;
+		if (page) {
 			drbd_pp_pool = (struct page *)page_private(page);
 			drbd_pp_vacant--;
 		}
@@ -163,7 +166,8 @@
 		 * don't wait, if none is available, though.
 		 */
 		if ( atomic_read(&mdev->pp_in_use) < mdev->net_conf->max_buffers ) {
-			if ( (page = alloc_page(GFP_TRY)) )
+			page = alloc_page(GFP_TRY);
+			if (page)
 				break;
 		}
 
@@ -617,7 +621,7 @@
 	src_in.sin_port = 0;
 
 	err = sock->ops->bind(sock,
-			      (struct sockaddr * ) &src_in,
+			      (struct sockaddr *) &src_in,
 			      sizeof (struct sockaddr_in));
 	if (err) {
 		ERR("Unable to bind source sock (%d)\n", err);
@@ -1745,7 +1749,8 @@
 				WARN("Sucessfully gave up primary role.\n");
 				rv = hg;
 			}
-		} else rv = hg;
+		} else
+			rv = hg;
 	}
 
 	return rv;
@@ -1783,7 +1788,8 @@
 				WARN("Sucessfully gave up primary role.\n");
 				rv = hg;
 			}
-		} else rv = hg;
+		} else
+			rv = hg;
 	}
 
 	return rv;
@@ -2514,7 +2520,7 @@
 };
 
 static drbd_cmd_handler_f *drbd_cmd_handler = drbd_default_handler;
-static drbd_cmd_handler_f *drbd_opt_cmd_handler = NULL;
+static drbd_cmd_handler_f *drbd_opt_cmd_handler;
 
 STATIC void drbdd(drbd_dev *mdev)
 {
@@ -2972,7 +2978,7 @@
 		goto fail;
 	}
 
-	rv = ! memcmp(response, right_response, resp_size);
+	rv = !memcmp(response, right_response, resp_size);
 
 	if (rv)
 		INFO("Peer authenticated using %d bytes of '%s' HMAC\n",

Modified: branches/drbd-8.0-for-linus/drbd/drbd_req.c
===================================================================
--- branches/drbd-8.0-for-linus/drbd/drbd_req.c	2007-07-24 13:25:49 UTC (rev 2993)
+++ branches/drbd-8.0-for-linus/drbd/drbd_req.c	2007-07-24 13:35:47 UTC (rev 2994)
@@ -291,8 +291,10 @@
 
 		/* remove the request from the conflict detection
 		 * respective block_id verification hash */
-		if (!hlist_unhashed(&req->colision)) hlist_del(&req->colision);
-		else D_ASSERT((s & RQ_NET_MASK) == 0);
+		if (!hlist_unhashed(&req->colision))
+			hlist_del(&req->colision);
+		else
+			D_ASSERT((s & RQ_NET_MASK) == 0);
 
 		/* for writes we need to do some extra housekeeping */
 		if (rw == WRITE)
@@ -859,9 +861,8 @@
 	 * if we lost that race, we retry.  */
 	if (rw == WRITE && remote &&
 	    mdev->unused_spare_barrier == NULL &&
-	    test_bit(ISSUE_BARRIER, &mdev->flags))
-	{
-  allocate_barrier:
+	    test_bit(ISSUE_BARRIER, &mdev->flags)) {
+allocate_barrier:
 		b = kmalloc(sizeof(struct drbd_barrier), GFP_NOIO);
 		if (!b) {
 			ERR("Failed to alloc barrier.");
@@ -980,8 +981,10 @@
 		 * or READ, and no local disk,
 		 * or READ, but not in sync.
 		 */
-		if (rw == WRITE) _req_mod(req, queue_for_net_write, 0);
-		else		 _req_mod(req, queue_for_net_read, 0);
+		if (rw == WRITE)
+			_req_mod(req, queue_for_net_write, 0);
+		else
+			_req_mod(req, queue_for_net_read, 0);
 	}
 	spin_unlock_irq(&mdev->req_lock);
 	if (b) kfree(b); /* if someone else has beaten us to it... */
@@ -1111,7 +1114,8 @@
 		drbd_make_request_26(q, &bp->bio2);
 		bio_pair_release(bp);
 		return 0;
-	}}
+	}
+	}
 
 	return drbd_make_request_common(mdev, bio_rw(bio), bio->bi_size,
 					bio->bi_sector, bio);

Modified: branches/drbd-8.0-for-linus/drbd/drbd_strings.c
===================================================================
--- branches/drbd-8.0-for-linus/drbd/drbd_strings.c	2007-07-24 13:25:49 UTC (rev 2993)
+++ branches/drbd-8.0-for-linus/drbd/drbd_strings.c	2007-07-24 13:35:47 UTC (rev 2994)
@@ -83,20 +83,24 @@
 	[-SS_DeviceInUse] = "Device is held open by someone"
 };
 
-const char *conns_to_name(drbd_conns_t s) {
+const char *conns_to_name(drbd_conns_t s)
+{
 	/* enums are unsigned... */
 	return s > PausedSyncT ? "TOO_LARGE" : drbd_conn_s_names[s];
 }
 
-const char *roles_to_name(drbd_role_t s) {
+const char *roles_to_name(drbd_role_t s)
+{
 	return s > Secondary   ? "TOO_LARGE" : drbd_role_s_names[s];
 }
 
-const char *disks_to_name(drbd_disks_t s) {
+const char *disks_to_name(drbd_disks_t s)
+{
 	return s > UpToDate    ? "TOO_LARGE" : drbd_disk_s_names[s];
 }
 
-const char *set_st_err_name(set_st_err_t err) {
+const char *set_st_err_name(set_st_err_t err)
+{
 	return err < SS_DeviceInUse ? "TOO_SMALL" :
 	       err > SS_TwoPrimaries ? "TOO_LARGE"
 			: drbd_state_sw_errors[-err];

Modified: branches/drbd-8.0-for-linus/drbd/drbd_worker.c
===================================================================
--- branches/drbd-8.0-for-linus/drbd/drbd_worker.c	2007-07-24 13:25:49 UTC (rev 2993)
+++ branches/drbd-8.0-for-linus/drbd/drbd_worker.c	2007-07-24 13:35:47 UTC (rev 2994)
@@ -411,7 +411,8 @@
 #endif
 
 		/* adjust very last sectors, in case we are oddly sized */
-		if (sector + (size>>9) > capacity) size = (capacity-sector)<<9;
+		if (sector + (size>>9) > capacity)
+			size = (capacity-sector)<<9;
 		inc_rs_pending(mdev);
 		if (!drbd_send_drequest(mdev, RSDataRequest,
 				       sector, size, ID_SYNCER)) {
@@ -746,7 +747,9 @@
 
 	local_irq_disable();
 	for (i = 0; i < minor_count; i++) {
-		if (!(mdev = minor_to_mdev(i))) continue;
+		mdev = minor_to_mdev(i);
+		if (!mdev)
+			continue;
 		spin_lock(&mdev->req_lock);
 	}
 }
@@ -757,7 +760,9 @@
 	int i;
 
 	for (i = 0; i < minor_count; i++) {
-		if (!(mdev = minor_to_mdev(i))) continue;
+		mdev = minor_to_mdev(i);
+		if (!mdev)
+			continue;
 		spin_unlock(&mdev->req_lock);
 	}
 	local_irq_enable();
@@ -813,7 +818,9 @@
 	int i, rv = 0;
 
 	for (i = 0; i < minor_count; i++) {
-		if ( !(odev = minor_to_mdev(i)) ) continue;
+		odev = minor_to_mdev(i);
+		if (!odev)
+			continue;
 		if (odev->state.aftr_isp) {
 			if (_drbd_may_sync_now(odev))
 				rv |= ( _drbd_set_state(_NS(odev, aftr_isp, 0),

Modified: branches/drbd-8.0-for-linus/drbd/linux/drbd_tag_magic.h
===================================================================
--- branches/drbd-8.0-for-linus/drbd/linux/drbd_tag_magic.h	2007-07-24 13:25:49 UTC (rev 2993)
+++ branches/drbd-8.0-for-linus/drbd/linux/drbd_tag_magic.h	2007-07-24 13:35:47 UTC (rev 2994)
@@ -32,10 +32,10 @@
 /* declate tag-list-sizes */
 const int tag_list_sizes[] = {
 #define PACKET(name, number, fields) 2 fields ,
-#define INTEGER(pn, pr, member)      +4+4
-#define INT64(pn, pr, member)        +4+8
-#define BIT(pn, pr, member)          +4+1
-#define STRING(pn, pr, member, len)  +4+len
+#define INTEGER(pn, pr, member)      + 4 + 4
+#define INT64(pn, pr, member)        + 4 + 8
+#define BIT(pn, pr, member)          + 4 + 1
+#define STRING(pn, pr, member, len)  + 4 + len
 #include "drbd_nl.h"
 };
 



More information about the drbd-cvs mailing list