Commit 12e397cd authored by Le Tan's avatar Le Tan Committed by Greg Kroah-Hartman

staging: lustre: resolves sparse warnings using static declaration

This patch resolves sparse warnings about non-declared symbol in
staging/lustre/lustre/lov by adding static declaration.
These warnings are like this:
	warning: symbol 'fiemap_calc_fm_end_offset' was not declared. Should it be static?
Signed-off-by: default avatarLe Tan <tamlok@live.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 43a9a85a
......@@ -209,8 +209,8 @@ static int lsm_lmm_verify_v1(struct lov_mds_md_v1 *lmm, int lmm_bytes,
return lsm_lmm_verify_common(lmm, lmm_bytes, *stripe_count);
}
int lsm_unpackmd_v1(struct lov_obd *lov, struct lov_stripe_md *lsm,
struct lov_mds_md_v1 *lmm)
static int lsm_unpackmd_v1(struct lov_obd *lov, struct lov_stripe_md *lsm,
struct lov_mds_md_v1 *lmm)
{
struct lov_oinfo *loi;
int i;
......@@ -287,8 +287,8 @@ static int lsm_lmm_verify_v3(struct lov_mds_md *lmmv1, int lmm_bytes,
*stripe_count);
}
int lsm_unpackmd_v3(struct lov_obd *lov, struct lov_stripe_md *lsm,
struct lov_mds_md *lmmv1)
static int lsm_unpackmd_v3(struct lov_obd *lov, struct lov_stripe_md *lsm,
struct lov_mds_md *lmmv1)
{
struct lov_mds_md_v3 *lmm;
struct lov_oinfo *loi;
......
......@@ -1601,9 +1601,9 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
* \param fm_end logical end of mapping
* \param start_stripe starting stripe will be returned in this
*/
u64 fiemap_calc_fm_end_offset(struct ll_user_fiemap *fiemap,
struct lov_stripe_md *lsm, u64 fm_start,
u64 fm_end, int *start_stripe)
static u64 fiemap_calc_fm_end_offset(struct ll_user_fiemap *fiemap,
struct lov_stripe_md *lsm, u64 fm_start,
u64 fm_end, int *start_stripe)
{
u64 local_end = fiemap->fm_extents[0].fe_logical;
u64 lun_start, lun_end;
......@@ -1658,9 +1658,9 @@ u64 fiemap_calc_fm_end_offset(struct ll_user_fiemap *fiemap,
*
* \retval last_stripe return the last stripe of the mapping
*/
int fiemap_calc_last_stripe(struct lov_stripe_md *lsm, u64 fm_start,
u64 fm_end, int start_stripe,
int *stripe_count)
static int fiemap_calc_last_stripe(struct lov_stripe_md *lsm, u64 fm_start,
u64 fm_end, int start_stripe,
int *stripe_count)
{
int last_stripe;
u64 obd_start, obd_end;
......@@ -1694,10 +1694,10 @@ int fiemap_calc_last_stripe(struct lov_stripe_md *lsm, u64 fm_start,
* \param ext_count number of extents to be copied
* \param current_extent where to start copying in main extent array
*/
void fiemap_prepare_and_copy_exts(struct ll_user_fiemap *fiemap,
struct ll_fiemap_extent *lcl_fm_ext,
int ost_index, unsigned int ext_count,
int current_extent)
static void fiemap_prepare_and_copy_exts(struct ll_user_fiemap *fiemap,
struct ll_fiemap_extent *lcl_fm_ext,
int ost_index, unsigned int ext_count,
int current_extent)
{
char *to;
int ext;
......@@ -2290,7 +2290,7 @@ static int lov_quotacheck(struct obd_device *obd, struct obd_export *exp,
return rc;
}
struct obd_ops lov_obd_ops = {
static struct obd_ops lov_obd_ops = {
.o_owner = THIS_MODULE,
.o_setup = lov_setup,
.o_precleanup = lov_precleanup,
......@@ -2324,7 +2324,7 @@ struct obd_ops lov_obd_ops = {
struct kmem_cache *lov_oinfo_slab;
int __init lov_init(void)
static int __init lov_init(void)
{
struct lprocfs_static_vars lvars = { NULL };
int rc;
......
......@@ -563,7 +563,7 @@ static const struct lov_layout_operations lov_dispatch[] = {
/**
* Return lov_layout_type associated with a given lsm
*/
enum lov_layout_type lov_type(struct lov_stripe_md *lsm)
static enum lov_layout_type lov_type(struct lov_stripe_md *lsm)
{
if (lsm == NULL)
return LLT_EMPTY;
......
......@@ -71,7 +71,7 @@ void lov_pool_putref(struct pool_desc *pool)
}
}
void lov_pool_putref_locked(struct pool_desc *pool)
static void lov_pool_putref_locked(struct pool_desc *pool)
{
CDEBUG(D_INFO, "pool %p\n", pool);
LASSERT(atomic_read(&pool->pool_refcount) > 1);
......
......@@ -241,7 +241,7 @@ static int lov_tgt_seq_show(struct seq_file *p, void *v)
return 0;
}
struct seq_operations lov_tgt_sops = {
static const struct seq_operations lov_tgt_sops = {
.start = lov_tgt_seq_start,
.stop = lov_tgt_seq_stop,
.next = lov_tgt_seq_next,
......@@ -270,7 +270,7 @@ LPROC_SEQ_FOPS_RO_TYPE(lov, kbytestotal);
LPROC_SEQ_FOPS_RO_TYPE(lov, kbytesfree);
LPROC_SEQ_FOPS_RO_TYPE(lov, kbytesavail);
struct lprocfs_vars lprocfs_lov_obd_vars[] = {
static struct lprocfs_vars lprocfs_lov_obd_vars[] = {
{ "uuid", &lov_uuid_fops, NULL, 0 },
{ "stripesize", &lov_stripesize_fops, NULL },
{ "stripeoffset", &lov_stripeoffset_fops, NULL },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment