Commit 9ee15880 authored by NeilBrown's avatar NeilBrown Committed by Greg Kroah-Hartman
Browse files

staging: lustre: fix assorted checkpatch errors



Possibly the most interesting is the for-loop with no body.
Rearranging and initializing end_dirent on each iteration of
the outer while, makes the intent clearer.

Reviewed-by: default avatar"Eremin, Dmitry" <dmitry.eremin@intel.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d0efa68a
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -294,10 +294,10 @@ struct obdo;

void obdo_to_ioobj(const struct obdo *oa, struct obd_ioobj *ioobj);

#define OBT(dev)	(dev)->obd_type
#define OBP(dev, op)    (dev)->obd_type->typ_dt_ops->op
#define MDP(dev, op)    (dev)->obd_type->typ_md_ops->op
#define CTXTP(ctxt, op) (ctxt)->loc_logops->lop_##op
#define OBT(dev)	((dev)->obd_type)
#define OBP(dev, op)    ((dev)->obd_type->typ_dt_ops->op)
#define MDP(dev, op)    ((dev)->obd_type->typ_md_ops->op)
#define CTXTP(ctxt, op) ((ctxt)->loc_logops->lop_##op)

/*
 * Ensure obd_setup: used for cleanup which must be called
+1 −1
Original line number Diff line number Diff line
@@ -516,7 +516,7 @@ extern char obd_jobid_var[];
#define POISON_PTR(ptr)  ((void)0)
#else
#define POISON(ptr, c, s) memset(ptr, c, s)
#define POISON_PTR(ptr)  (ptr) = (void *)0xdeadbeef
#define POISON_PTR(ptr)  ((ptr) = (void *)0xdeadbeef)
#endif

#ifdef POISON_BULK
+6 −5
Original line number Diff line number Diff line
@@ -1055,13 +1055,14 @@ static void mdc_adjust_dirpages(struct page **pages, int cfs_pgs, int lu_pgs)
		__u64 hash_end = le64_to_cpu(dp->ldp_hash_end);
		__u32 flags = le32_to_cpu(dp->ldp_flags);
		struct lu_dirpage *first = dp;

		while (--lu_pgs > 0) {
			struct lu_dirent *end_dirent = NULL;
			struct lu_dirent *ent;

		while (--lu_pgs > 0) {
			ent = lu_dirent_start(dp);
			for (end_dirent = ent; ent;
			     end_dirent = ent, ent = lu_dirent_next(ent));
			for (ent = lu_dirent_start(dp); ent;
			     ent = lu_dirent_next(ent))
				end_dirent = ent;

			/* Advance dp to next lu_dirpage. */
			dp = (struct lu_dirpage *)((char *)dp + LU_PAGE_SIZE);
+1 −1
Original line number Diff line number Diff line
@@ -1555,7 +1555,7 @@ struct req_format RQF_OST_GET_INFO_FIEMAP =
EXPORT_SYMBOL(RQF_OST_GET_INFO_FIEMAP);

/* Convenience macro */
#define FMT_FIELD(fmt, i, j) (fmt)->rf_fields[(i)].d[(j)]
#define FMT_FIELD(fmt, i, j) ((fmt)->rf_fields[(i)].d[(j)])

/**
 * Initializes the capsule abstraction by computing and setting the \a rf_idx
+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

Loading