From: Shraddha Barke Date: Wed, 7 Oct 2015 20:06:05 +0000 (+0530) Subject: Staging: lustre: ptlrpc: pack_generic: Declare local functions as static X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=fcdf51c179d50e71ce9e5a11d87c32baef3c1004;p=deliverable%2Flinux.git Staging: lustre: ptlrpc: pack_generic: Declare local functions as static Declare lustre_swab_ldlm_resource_desc, lustre_swab_obdo, lustre_swab_ldlm_res_id, lustre_swab_ldlm_policy_data as static since they are used only in this particular file. Also remove the corresponding declarations from header file. Signed-off-by: Shraddha Barke Reviewed-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h index e629ca391201..c4d6c56fc7df 100644 --- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h @@ -2679,8 +2679,6 @@ struct ldlm_res_id { #define PLDLMRES(res) (res)->lr_name.name[0], (res)->lr_name.name[1], \ (res)->lr_name.name[2], (res)->lr_name.name[3] -void lustre_swab_ldlm_res_id(struct ldlm_res_id *id); - static inline int ldlm_res_eq(const struct ldlm_res_id *res0, const struct ldlm_res_id *res1) { @@ -2756,8 +2754,6 @@ typedef union { struct ldlm_inodebits l_inodebits; } ldlm_wire_policy_data_t; -void lustre_swab_ldlm_policy_data(ldlm_wire_policy_data_t *d); - union ldlm_gl_desc { struct ldlm_gl_lquota_desc lquota_desc; }; @@ -2776,8 +2772,6 @@ struct ldlm_resource_desc { struct ldlm_res_id lr_name; }; -void lustre_swab_ldlm_resource_desc(struct ldlm_resource_desc *r); - struct ldlm_lock_desc { struct ldlm_resource_desc l_resource; ldlm_mode_t l_req_mode; @@ -3317,8 +3311,6 @@ static inline void lustre_get_wire_obdo(struct obd_connect_data *ocd, } } -void lustre_swab_obdo(struct obdo *o); - /* request structure for OST's */ struct ost_body { struct obdo oa; diff --git a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c index 23cf1b0fa9b9..973ff8ddb0c9 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c +++ b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c @@ -1501,7 +1501,7 @@ void lustre_swab_connect(struct obd_connect_data *ocd) CLASSERT(offsetof(typeof(*ocd), paddingF) != 0); } -void lustre_swab_obdo(struct obdo *o) +static void lustre_swab_obdo(struct obdo *o) { __swab64s(&o->o_valid); lustre_swab_ost_id(&o->o_oi); @@ -1533,7 +1533,6 @@ void lustre_swab_obdo(struct obdo *o) CLASSERT(offsetof(typeof(*o), o_padding_6) != 0); } -EXPORT_SYMBOL(lustre_swab_obdo); void lustre_swab_obd_statfs(struct obd_statfs *os) { @@ -1941,16 +1940,15 @@ void lustre_swab_lov_user_md_objects(struct lov_user_ost_data *lod, } EXPORT_SYMBOL(lustre_swab_lov_user_md_objects); -void lustre_swab_ldlm_res_id(struct ldlm_res_id *id) +static void lustre_swab_ldlm_res_id(struct ldlm_res_id *id) { int i; for (i = 0; i < RES_NAME_SIZE; i++) __swab64s(&id->name[i]); } -EXPORT_SYMBOL(lustre_swab_ldlm_res_id); -void lustre_swab_ldlm_policy_data(ldlm_wire_policy_data_t *d) +static void lustre_swab_ldlm_policy_data(ldlm_wire_policy_data_t *d) { /* the lock data is a union and the first two fields are always an * extent so it's ok to process an LDLM_EXTENT and LDLM_FLOCK lock @@ -1961,7 +1959,6 @@ void lustre_swab_ldlm_policy_data(ldlm_wire_policy_data_t *d) __swab64s(&d->l_flock.lfw_owner); __swab32s(&d->l_flock.lfw_pid); } -EXPORT_SYMBOL(lustre_swab_ldlm_policy_data); void lustre_swab_ldlm_intent(struct ldlm_intent *i) { @@ -1969,13 +1966,12 @@ void lustre_swab_ldlm_intent(struct ldlm_intent *i) } EXPORT_SYMBOL(lustre_swab_ldlm_intent); -void lustre_swab_ldlm_resource_desc(struct ldlm_resource_desc *r) +static void lustre_swab_ldlm_resource_desc(struct ldlm_resource_desc *r) { __swab32s(&r->lr_type); CLASSERT(offsetof(typeof(*r), lr_padding) != 0); lustre_swab_ldlm_res_id(&r->lr_name); } -EXPORT_SYMBOL(lustre_swab_ldlm_resource_desc); static void lustre_swab_ldlm_lock_desc(struct ldlm_lock_desc *l) {