]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
staging: lustre: resolves sparse warnings using static declaration
authorLe Tan <tamlok@live.com>
Wed, 11 Feb 2015 04:13:14 +0000 (12:13 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Mar 2015 01:28:34 +0000 (17:28 -0800)
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: Le Tan <tamlok@live.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/lov/lov_ea.c
drivers/staging/lustre/lustre/lov/lov_obd.c
drivers/staging/lustre/lustre/lov/lov_object.c
drivers/staging/lustre/lustre/lov/lov_pool.c
drivers/staging/lustre/lustre/lov/lproc_lov.c

index e9ec39c5a6c2eb506e7d24a49a15b50b5fccbe66..d1b0417d50583a2b2d3a99c049020ae6d6de5f87 100644 (file)
@@ -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;
index 2c6c55837c7a8065d787f533671d3eca0d86c7de..219852a14cc60f9ad39a76480ae8367d37d96487 100644 (file)
@@ -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 @@ out:
        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;
index 4cab730ab429b2898e6a1d9312c977e3d0caf696..d69a0354baf51a4875b1cb0dfeebc830c4ed8928 100644 (file)
@@ -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;
index 0e0ea60de4c867b68bfff83e2d481a8e19bc6ce7..d96163de773f75542eadad37d740164eac60bb35 100644 (file)
@@ -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);
index 2d0706222001a4abddc7fb0067e7a770780c6617..174cbf5c138f87f7be3591d288c32ef07d2805b9 100644 (file)
@@ -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 },