Commit a13b1f32 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

staging: lustre: remove o_ prefix from function pointers

We mostly refer to these function pointers using macros that use macro
magic to add the "o_" prefix to the front.  It means that you can't use
cscope to find the caller.  Heck, you can't even grep for it.

I looked at preserving the "o_" prefix by removing the macro magic and
adding "o_" to all the call sites but then I realized that, really, the
prefix doesn't add any value.  Let's just remove it.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ab419903
This diff is collapsed.
......@@ -270,7 +270,7 @@ void obdo_to_ioobj(struct obdo *oa, struct obd_ioobj *ioobj);
void md_from_obdo(struct md_op_data *op_data, struct obdo *oa, u32 valid);
#define OBT(dev) (dev)->obd_type
#define OBP(dev, op) (dev)->obd_type->typ_dt_ops->o_ ## op
#define OBP(dev, op) (dev)->obd_type->typ_dt_ops->op
#define MDP(dev, op) (dev)->obd_type->typ_md_ops->m_ ## op
#define CTXTP(ctxt, op) (ctxt)->loc_logops->lop_##op
......@@ -301,9 +301,9 @@ static inline int obd_check_dev_active(struct obd_device *obd)
}
#define OBD_COUNTER_OFFSET(op) \
((offsetof(struct obd_ops, o_ ## op) - \
offsetof(struct obd_ops, o_iocontrol)) \
/ sizeof(((struct obd_ops *)(0))->o_iocontrol))
((offsetof(struct obd_ops, op) - \
offsetof(struct obd_ops, iocontrol)) \
/ sizeof(((struct obd_ops *)(0))->iocontrol))
#define OBD_COUNTER_INCREMENT(obdx, op) \
if ((obdx)->obd_stats != NULL) { \
......
......@@ -2744,23 +2744,23 @@ static int lmv_quotacheck(struct obd_device *unused, struct obd_export *exp,
}
static struct obd_ops lmv_obd_ops = {
.o_owner = THIS_MODULE,
.o_setup = lmv_setup,
.o_cleanup = lmv_cleanup,
.o_precleanup = lmv_precleanup,
.o_process_config = lmv_process_config,
.o_connect = lmv_connect,
.o_disconnect = lmv_disconnect,
.o_statfs = lmv_statfs,
.o_get_info = lmv_get_info,
.o_set_info_async = lmv_set_info_async,
.o_packmd = lmv_packmd,
.o_unpackmd = lmv_unpackmd,
.o_notify = lmv_notify,
.o_get_uuid = lmv_get_uuid,
.o_iocontrol = lmv_iocontrol,
.o_quotacheck = lmv_quotacheck,
.o_quotactl = lmv_quotactl
.owner = THIS_MODULE,
.setup = lmv_setup,
.cleanup = lmv_cleanup,
.precleanup = lmv_precleanup,
.process_config = lmv_process_config,
.connect = lmv_connect,
.disconnect = lmv_disconnect,
.statfs = lmv_statfs,
.get_info = lmv_get_info,
.set_info_async = lmv_set_info_async,
.packmd = lmv_packmd,
.unpackmd = lmv_unpackmd,
.notify = lmv_notify,
.get_uuid = lmv_get_uuid,
.iocontrol = lmv_iocontrol,
.quotacheck = lmv_quotacheck,
.quotactl = lmv_quotactl
};
static struct md_ops lmv_md_ops = {
......
......@@ -2277,35 +2277,35 @@ static int lov_quotacheck(struct obd_device *obd, struct obd_export *exp,
}
static struct obd_ops lov_obd_ops = {
.o_owner = THIS_MODULE,
.o_setup = lov_setup,
.o_precleanup = lov_precleanup,
.o_cleanup = lov_cleanup,
/*.o_process_config = lov_process_config,*/
.o_connect = lov_connect,
.o_disconnect = lov_disconnect,
.o_statfs = lov_statfs,
.o_statfs_async = lov_statfs_async,
.o_packmd = lov_packmd,
.o_unpackmd = lov_unpackmd,
.o_create = lov_create,
.o_destroy = lov_destroy,
.o_getattr_async = lov_getattr_async,
.o_setattr_async = lov_setattr_async,
.o_adjust_kms = lov_adjust_kms,
.o_find_cbdata = lov_find_cbdata,
.o_iocontrol = lov_iocontrol,
.o_get_info = lov_get_info,
.o_set_info_async = lov_set_info_async,
.o_notify = lov_notify,
.o_pool_new = lov_pool_new,
.o_pool_rem = lov_pool_remove,
.o_pool_add = lov_pool_add,
.o_pool_del = lov_pool_del,
.o_getref = lov_getref,
.o_putref = lov_putref,
.o_quotactl = lov_quotactl,
.o_quotacheck = lov_quotacheck,
.owner = THIS_MODULE,
.setup = lov_setup,
.precleanup = lov_precleanup,
.cleanup = lov_cleanup,
/*.process_config = lov_process_config,*/
.connect = lov_connect,
.disconnect = lov_disconnect,
.statfs = lov_statfs,
.statfs_async = lov_statfs_async,
.packmd = lov_packmd,
.unpackmd = lov_unpackmd,
.create = lov_create,
.destroy = lov_destroy,
.getattr_async = lov_getattr_async,
.setattr_async = lov_setattr_async,
.adjust_kms = lov_adjust_kms,
.find_cbdata = lov_find_cbdata,
.iocontrol = lov_iocontrol,
.get_info = lov_get_info,
.set_info_async = lov_set_info_async,
.notify = lov_notify,
.pool_new = lov_pool_new,
.pool_rem = lov_pool_remove,
.pool_add = lov_pool_add,
.pool_del = lov_pool_del,
.getref = lov_getref,
.putref = lov_putref,
.quotactl = lov_quotactl,
.quotacheck = lov_quotacheck,
};
struct kmem_cache *lov_oinfo_slab;
......
......@@ -2460,26 +2460,26 @@ static int mdc_get_remote_perm(struct obd_export *exp, const struct lu_fid *fid,
}
static struct obd_ops mdc_obd_ops = {
.o_owner = THIS_MODULE,
.o_setup = mdc_setup,
.o_precleanup = mdc_precleanup,
.o_cleanup = mdc_cleanup,
.o_add_conn = client_import_add_conn,
.o_del_conn = client_import_del_conn,
.o_connect = client_connect_import,
.o_disconnect = client_disconnect_export,
.o_iocontrol = mdc_iocontrol,
.o_set_info_async = mdc_set_info_async,
.o_statfs = mdc_statfs,
.o_fid_init = client_fid_init,
.o_fid_fini = client_fid_fini,
.o_fid_alloc = mdc_fid_alloc,
.o_import_event = mdc_import_event,
.o_get_info = mdc_get_info,
.o_process_config = mdc_process_config,
.o_get_uuid = mdc_get_uuid,
.o_quotactl = mdc_quotactl,
.o_quotacheck = mdc_quotacheck
.owner = THIS_MODULE,
.setup = mdc_setup,
.precleanup = mdc_precleanup,
.cleanup = mdc_cleanup,
.add_conn = client_import_add_conn,
.del_conn = client_import_del_conn,
.connect = client_connect_import,
.disconnect = client_disconnect_export,
.iocontrol = mdc_iocontrol,
.set_info_async = mdc_set_info_async,
.statfs = mdc_statfs,
.fid_init = client_fid_init,
.fid_fini = client_fid_fini,
.fid_alloc = mdc_fid_alloc,
.import_event = mdc_import_event,
.get_info = mdc_get_info,
.process_config = mdc_process_config,
.get_uuid = mdc_get_uuid,
.quotactl = mdc_quotactl,
.quotacheck = mdc_quotacheck
};
static struct md_ops mdc_md_ops = {
......
......@@ -1698,20 +1698,20 @@ static int mgc_process_config(struct obd_device *obd, u32 len, void *buf)
}
static struct obd_ops mgc_obd_ops = {
.o_owner = THIS_MODULE,
.o_setup = mgc_setup,
.o_precleanup = mgc_precleanup,
.o_cleanup = mgc_cleanup,
.o_add_conn = client_import_add_conn,
.o_del_conn = client_import_del_conn,
.o_connect = client_connect_import,
.o_disconnect = client_disconnect_export,
/* .o_enqueue = mgc_enqueue, */
/* .o_iocontrol = mgc_iocontrol, */
.o_set_info_async = mgc_set_info_async,
.o_get_info = mgc_get_info,
.o_import_event = mgc_import_event,
.o_process_config = mgc_process_config,
.owner = THIS_MODULE,
.setup = mgc_setup,
.precleanup = mgc_precleanup,
.cleanup = mgc_cleanup,
.add_conn = client_import_add_conn,
.del_conn = client_import_del_conn,
.connect = client_connect_import,
.disconnect = client_disconnect_export,
/* .enqueue = mgc_enqueue, */
/* .iocontrol = mgc_iocontrol, */
.set_info_async = mgc_set_info_async,
.get_info = mgc_get_info,
.import_event = mgc_import_event,
.process_config = mgc_process_config,
};
static int __init mgc_init(void)
......
......@@ -132,7 +132,7 @@ static struct obd_type *class_get_type(const char *name)
if (type) {
spin_lock(&type->obd_type_lock);
type->typ_refcnt++;
try_module_get(type->typ_dt_ops->o_owner);
try_module_get(type->typ_dt_ops->owner);
spin_unlock(&type->obd_type_lock);
}
return type;
......@@ -143,7 +143,7 @@ void class_put_type(struct obd_type *type)
LASSERT(type);
spin_lock(&type->obd_type_lock);
type->typ_refcnt--;
module_put(type->typ_dt_ops->o_owner);
module_put(type->typ_dt_ops->owner);
spin_unlock(&type->obd_type_lock);
}
EXPORT_SYMBOL(class_put_type);
......
......@@ -2128,10 +2128,10 @@ static int echo_client_disconnect(struct obd_export *exp)
}
static struct obd_ops echo_client_obd_ops = {
.o_owner = THIS_MODULE,
.o_iocontrol = echo_client_iocontrol,
.o_connect = echo_client_connect,
.o_disconnect = echo_client_disconnect
.owner = THIS_MODULE,
.iocontrol = echo_client_iocontrol,
.connect = echo_client_connect,
.disconnect = echo_client_disconnect
};
static int echo_client_init(void)
......
......@@ -3255,33 +3255,33 @@ static int osc_process_config(struct obd_device *obd, u32 len, void *buf)
}
struct obd_ops osc_obd_ops = {
.o_owner = THIS_MODULE,
.o_setup = osc_setup,
.o_precleanup = osc_precleanup,
.o_cleanup = osc_cleanup,
.o_add_conn = client_import_add_conn,
.o_del_conn = client_import_del_conn,
.o_connect = client_connect_import,
.o_reconnect = osc_reconnect,
.o_disconnect = osc_disconnect,
.o_statfs = osc_statfs,
.o_statfs_async = osc_statfs_async,
.o_packmd = osc_packmd,
.o_unpackmd = osc_unpackmd,
.o_create = osc_create,
.o_destroy = osc_destroy,
.o_getattr = osc_getattr,
.o_getattr_async = osc_getattr_async,
.o_setattr = osc_setattr,
.o_setattr_async = osc_setattr_async,
.o_find_cbdata = osc_find_cbdata,
.o_iocontrol = osc_iocontrol,
.o_get_info = osc_get_info,
.o_set_info_async = osc_set_info_async,
.o_import_event = osc_import_event,
.o_process_config = osc_process_config,
.o_quotactl = osc_quotactl,
.o_quotacheck = osc_quotacheck,
.owner = THIS_MODULE,
.setup = osc_setup,
.precleanup = osc_precleanup,
.cleanup = osc_cleanup,
.add_conn = client_import_add_conn,
.del_conn = client_import_del_conn,
.connect = client_connect_import,
.reconnect = osc_reconnect,
.disconnect = osc_disconnect,
.statfs = osc_statfs,
.statfs_async = osc_statfs_async,
.packmd = osc_packmd,
.unpackmd = osc_unpackmd,
.create = osc_create,
.destroy = osc_destroy,
.getattr = osc_getattr,
.getattr_async = osc_getattr_async,
.setattr = osc_setattr,
.setattr_async = osc_setattr_async,
.find_cbdata = osc_find_cbdata,
.iocontrol = osc_iocontrol,
.get_info = osc_get_info,
.set_info_async = osc_set_info_async,
.import_event = osc_import_event,
.process_config = osc_process_config,
.quotactl = osc_quotactl,
.quotacheck = osc_quotacheck,
};
extern struct lu_kmem_descr osc_caches[];
......
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