diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/libcfs/linux')
4 files changed, 19 insertions, 18 deletions
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-curproc.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-curproc.c index d71ad5ed1f6d..277f6b890e09 100644 --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-curproc.c +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-curproc.c @@ -82,17 +82,12 @@ int cfs_cap_raised(cfs_cap_t cap) return cap_raised(current_cap(), cap); } -void cfs_kernel_cap_pack(kernel_cap_t kcap, cfs_cap_t *cap) +static void cfs_kernel_cap_pack(kernel_cap_t kcap, cfs_cap_t *cap) { /* XXX lost high byte */ *cap = kcap.cap[0]; } -void cfs_kernel_cap_unpack(kernel_cap_t *kcap, cfs_cap_t cap) -{ - kcap->cap[0] = cap; -} - cfs_cap_t cfs_curproc_cap_pack(void) { cfs_cap_t cap; diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c index 83d3f08a37b2..c539e3741583 100644 --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c @@ -232,8 +232,9 @@ static int proc_debug_mb(struct ctl_table *table, int write, __proc_debug_mb); } -int proc_console_max_delay_cs(struct ctl_table *table, int write, - void __user *buffer, size_t *lenp, loff_t *ppos) +static int proc_console_max_delay_cs(struct ctl_table *table, int write, + void __user *buffer, size_t *lenp, + loff_t *ppos) { int rc, max_delay_cs; struct ctl_table dummy = *table; @@ -264,8 +265,9 @@ int proc_console_max_delay_cs(struct ctl_table *table, int write, return rc; } -int proc_console_min_delay_cs(struct ctl_table *table, int write, - void __user *buffer, size_t *lenp, loff_t *ppos) +static int proc_console_min_delay_cs(struct ctl_table *table, int write, + void __user *buffer, size_t *lenp, + loff_t *ppos) { int rc, min_delay_cs; struct ctl_table dummy = *table; @@ -296,8 +298,8 @@ int proc_console_min_delay_cs(struct ctl_table *table, int write, return rc; } -int proc_console_backoff(struct ctl_table *table, int write, - void __user *buffer, size_t *lenp, loff_t *ppos) +static int proc_console_backoff(struct ctl_table *table, int write, + void __user *buffer, size_t *lenp, loff_t *ppos) { int rc, backoff; struct ctl_table dummy = *table; @@ -324,16 +326,18 @@ int proc_console_backoff(struct ctl_table *table, int write, return rc; } -int libcfs_force_lbug(struct ctl_table *table, int write, void __user *buffer, - size_t *lenp, loff_t *ppos) +static int libcfs_force_lbug(struct ctl_table *table, int write, + void __user *buffer, + size_t *lenp, loff_t *ppos) { if (write) LBUG(); return 0; } -int proc_fail_loc(struct ctl_table *table, int write, void __user *buffer, - size_t *lenp, loff_t *ppos) +static int proc_fail_loc(struct ctl_table *table, int write, + void __user *buffer, + size_t *lenp, loff_t *ppos) { int rc; long old_fail_loc = cfs_fail_loc; diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c index b91a1f95bbd0..cd2fc01dea4c 100644 --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c @@ -43,7 +43,7 @@ /* For sys_open & sys_close */ #include <linux/syscalls.h> -int +static int libcfs_sock_ioctl(int cmd, unsigned long arg) { mm_segment_t oldmm = get_fs(); diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c index 976c61ed49f4..c8e293002e07 100644 --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c @@ -151,6 +151,7 @@ cfs_trace_buf_type_t cfs_trace_buf_idx_get(void) * for details. */ int cfs_trace_lock_tcd(struct cfs_trace_cpu_data *tcd, int walking) + __acquires(&tcd->tc_lock) { __LASSERT(tcd->tcd_type < CFS_TCD_TYPE_MAX); if (tcd->tcd_type == CFS_TCD_TYPE_IRQ) @@ -165,6 +166,7 @@ int cfs_trace_lock_tcd(struct cfs_trace_cpu_data *tcd, int walking) } void cfs_trace_unlock_tcd(struct cfs_trace_cpu_data *tcd, int walking) + __releases(&tcd->tcd_lock) { __LASSERT(tcd->tcd_type < CFS_TCD_TYPE_MAX); if (tcd->tcd_type == CFS_TCD_TYPE_IRQ) @@ -269,5 +271,5 @@ int cfs_trace_max_debug_mb(void) { int total_mb = (totalram_pages >> (20 - PAGE_SHIFT)); - return MAX(512, (total_mb * 80)/100); + return max(512, (total_mb * 80)/100); } |