Some functions and variables are only used in their C file, so reduce
their scope. This reduces the code size, and fixes sparse warnings
such as:
warning: symbol 'proc_lnet_routes' was not declared.
Should it be static?
warning: symbol 'proc_lnet_routers' was not declared.
Should it be static?
Some prototypes were removed from C files and added to the proper
header.
Signed-off-by: Frank Zago <fzago@cray.com>
Change-Id: Id6b13d2b5ceb30de02b60ed6be24d4a496454b70
Reviewed-on: http://review.whamcloud.com/12211
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LPROCFS_ENTRY_CHECK(PDE(inode)); \
return single_open(file, name##_seq_show, PDE_DATA(inode)); \
} \
LPROCFS_ENTRY_CHECK(PDE(inode)); \
return single_open(file, name##_seq_show, PDE_DATA(inode)); \
} \
-struct file_operations name##_fops = { \
+static const struct file_operations name##_fops = { \
.owner = THIS_MODULE, \
.open = name##_single_open, \
.read = seq_read, \
.owner = THIS_MODULE, \
.open = name##_single_open, \
.read = seq_read, \
-int ll_put_grouplock(struct inode *inode, struct file *file, unsigned long arg)
+static int ll_put_grouplock(struct inode *inode, struct file *file,
+ unsigned long arg)
{
struct ll_inode_info *lli = ll_i2info(inode);
struct ll_file_data *fd = LUSTRE_FPRIVATE(file);
{
struct ll_inode_info *lli = ll_i2info(inode);
struct ll_file_data *fd = LUSTRE_FPRIVATE(file);
OBD_FREE(hur, len);
RETURN(rc);
}
OBD_FREE(hur, len);
RETURN(rc);
}
struct ll_cl_context vti_io_ctx;
};
struct ll_cl_context vti_io_ctx;
};
+extern struct lu_context_key vvp_key;
+
static inline struct vvp_thread_info *vvp_env_info(const struct lu_env *env)
{
static inline struct vvp_thread_info *vvp_env_info(const struct lu_env *env)
{
- extern struct lu_context_key vvp_key;
struct vvp_thread_info *info;
info = lu_context_key_get(&env->le_ctx, &vvp_key);
struct vvp_thread_info *info;
info = lu_context_key_get(&env->le_ctx, &vvp_key);
+extern struct lu_context_key vvp_session_key;
+
static inline struct vvp_session *vvp_env_session(const struct lu_env *env)
{
static inline struct vvp_session *vvp_env_session(const struct lu_env *env)
{
- extern struct lu_context_key vvp_session_key;
struct vvp_session *ses;
ses = lu_context_key_get(env->le_ses, &vvp_session_key);
struct vvp_session *ses;
ses = lu_context_key_get(env->le_ses, &vvp_session_key);
-int ll_md_setattr(struct dentry *dentry, struct md_op_data *op_data,
- struct md_open_data **mod)
+static int ll_md_setattr(struct dentry *dentry, struct md_op_data *op_data,
+ struct md_open_data **mod)
{
struct lustre_md md;
struct inode *inode = dentry->d_inode;
{
struct lustre_md md;
struct inode *inode = dentry->d_inode;
#ifdef LPROCFS
/* /proc/lustre/llite mount point registration */
#ifdef LPROCFS
/* /proc/lustre/llite mount point registration */
-struct file_operations ll_rw_extents_stats_fops;
-struct file_operations ll_rw_extents_stats_pp_fops;
-struct file_operations ll_rw_offset_stats_fops;
+static const struct file_operations ll_rw_extents_stats_fops;
+static const struct file_operations ll_rw_extents_stats_pp_fops;
+static const struct file_operations ll_rw_offset_stats_fops;
static int ll_blksize_seq_show(struct seq_file *m, void *v)
{
static int ll_blksize_seq_show(struct seq_file *m, void *v)
{
* overlapping range node
* \retval INTERVAL_ITER_STOP indicate to stop the search
*/
* overlapping range node
* \retval INTERVAL_ITER_STOP indicate to stop the search
*/
-enum interval_iter range_unlock_cb(struct interval_node *node, void *arg)
+static enum interval_iter range_unlock_cb(struct interval_node *node, void *arg)
{
struct range_lock *lock = arg;
struct range_lock *overlap = node2rangelock(node);
{
struct range_lock *lock = arg;
struct range_lock *overlap = node2rangelock(node);
* overlapping range node
* \retval INTERVAL_ITER_STOP indicate to stop the search
*/
* overlapping range node
* \retval INTERVAL_ITER_STOP indicate to stop the search
*/
-enum interval_iter range_lock_cb(struct interval_node *node, void *arg)
+static enum interval_iter range_lock_cb(struct interval_node *node, void *arg)
{
struct range_lock *lock = (struct range_lock *)arg;
struct range_lock *overlap = node2rangelock(node);
{
struct range_lock *lock = (struct range_lock *)arg;
struct range_lock *overlap = node2rangelock(node);