Commit 5adb3290 authored by Baoyou Xie's avatar Baoyou Xie Committed by Greg Kroah-Hartman
Browse files

staging: lustre: lmv: mark symbols static where possible



We get a few warnings when building kernel with W=1:
drivers/staging/lustre/lustre/lmv/lmv_obd.c:1640:1: warning: no previous prototype for 'lmv_locate_target_for_name' [-Wmissing-prototypes]
drivers/staging/lustre/lustre/lmv/lmv_obd.c:2421:5: warning: no previous prototype for 'lmv_read_page' [-Wmissing-prototypes]
....

In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
so this patch marks these functions with 'static'.

Signed-off-by: default avatarBaoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b3f863a6
Loading
Loading
Loading
Loading
+21 −17
Original line number Diff line number Diff line
@@ -1636,7 +1636,7 @@ static int lmv_close(struct obd_export *exp, struct md_op_data *op_data,
 * For striped-directory, it will locate MDT by name. And also
 * it will reset op_fid1 with the FID of the chosen stripe.
 **/
struct lmv_tgt_desc *
static struct lmv_tgt_desc *
lmv_locate_target_for_name(struct lmv_obd *lmv, struct lmv_stripe_md *lsm,
			   const char *name, int namelen, struct lu_fid *fid,
			   u32 *mds)
@@ -2418,7 +2418,7 @@ out:
	return rc;
}

int lmv_read_page(struct obd_export *exp, struct md_op_data *op_data,
static int lmv_read_page(struct obd_export *exp, struct md_op_data *op_data,
			 struct md_callback *cb_op, __u64 offset,
			 struct page **ppage)
{
@@ -2771,7 +2771,8 @@ static int lmv_pack_md_v1(const struct lmv_stripe_md *lsm,
	return 0;
}

int lmv_pack_md(union lmv_mds_md **lmmp, const struct lmv_stripe_md *lsm,
static int
lmv_pack_md(union lmv_mds_md **lmmp, const struct lmv_stripe_md *lsm,
	    int stripe_count)
{
	int lmm_size = 0, rc = 0;
@@ -2966,14 +2967,14 @@ int lmv_unpack_md(struct obd_export *exp, struct lmv_stripe_md **lsmp,
}
EXPORT_SYMBOL(lmv_unpack_md);

int lmv_unpackmd(struct obd_export *exp, struct lov_stripe_md **lsmp,
static int lmv_unpackmd(struct obd_export *exp, struct lov_stripe_md **lsmp,
			struct lov_mds_md *lmm, int disk_len)
{
	return lmv_unpack_md(exp, (struct lmv_stripe_md **)lsmp,
			     (union lmv_mds_md *)lmm, disk_len);
}

int lmv_packmd(struct obd_export *exp, struct lov_mds_md **lmmp,
static int lmv_packmd(struct obd_export *exp, struct lov_mds_md **lmmp,
		      struct lov_stripe_md *lsm)
{
	const struct lmv_stripe_md *lmv = (struct lmv_stripe_md *)lsm;
@@ -3177,7 +3178,8 @@ static int lmv_revalidate_lock(struct obd_export *exp, struct lookup_intent *it,
	return rc;
}

int lmv_get_fid_from_lsm(struct obd_export *exp,
static int
lmv_get_fid_from_lsm(struct obd_export *exp,
		     const struct lmv_stripe_md *lsm,
		     const char *name, int namelen, struct lu_fid *fid)
{
@@ -3269,13 +3271,15 @@ static int lmv_quotacheck(struct obd_device *unused, struct obd_export *exp,
	return rc;
}

int lmv_update_lsm_md(struct obd_export *exp, struct lmv_stripe_md *lsm,
static int
lmv_update_lsm_md(struct obd_export *exp, struct lmv_stripe_md *lsm,
		  struct mdt_body *body, ldlm_blocking_callback cb_blocking)
{
	return lmv_revalidate_slaves(exp, body, lsm, cb_blocking, 0);
}

int lmv_merge_attr(struct obd_export *exp, const struct lmv_stripe_md *lsm,
static int
lmv_merge_attr(struct obd_export *exp, const struct lmv_stripe_md *lsm,
	       struct cl_attr *attr)
{
	int i;