staging - lustre: Fixed coding style issues
PATCH 1/1 staging - lustre: Fixed coding style issues
This patch fixes several coding style issues that were reported by checkpath on lproc_lmv.c.
Signed-off-by Filipe Gonçalves <[email protected]>
--- drivers/staging/lustre/lustre/lmv/lproc_lmv.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/staging/lustre/lustre/lmv/lproc_lmv.c +7 -6
@@ -37,7 +37,7 @@#define DEBUG_SUBSYSTEM S_CLASS#include <linux/seq_file.h> -#include <asm/statfs.h> +#include <linux/statfs.h> #include "../include/lprocfs_status.h" #include "../include/obd_class.h"
@@ -52,7 +52,7 @@ static int lmv_numobd_seq_show(struct seq_file *m, void *v) }LPROC_SEQ_FOPS_RO (lmv_numobd); -static const char *placement_name[] = { +static const char *const placement_name[] = { [PLACEMENT_CHAR_POLICY ] ="CHAR" , [PLACEMENT_NID_POLICY ] ="NID" , [PLACEMENT_INVAL_POLICY ] ="INVAL"
@@ -91,7 +91,8 @@ static ssize_t lmv_placement_seq_write(struct file *file,const char __user *buffer, size_t count, loff_t *off) { - struct obd_device *dev = ((struct seq_file *)file->private_data)->private; + struct obd_device *dev = + ((struct seq_file *)file->private_data)->private;char dummy[MAX_POLICY_STRING_SIZE +1 ];int len = count;placement_policy_t policy;
@@ -149,12 +150,12 @@ static void *lmv_tgt_seq_start(struct seq_file *p, loff_t *pos) {struct obd_device *dev = p->private;struct lmv_obd *lmv = &dev->u.lmv; +return (*pos >= lmv->desc.ld_tgt_count) ?NULL : lmv->tgts[*pos]; }static void lmv_tgt_seq_stop (struct seq_file *p,void *v) { -return ; }static void *lmv_tgt_seq_next (struct seq_file *p,void *v,loff_t *pos)
@@ -175,7 +176,7 @@ static int lmv_tgt_seq_show(struct seq_file *p, void *v) tgt->ltd_uuid.uuid, tgt->ltd_active ? "" : "IN"); } -struct seq_operations lmv_tgt_sops = { +static const struct seq_operations lmv_tgt_sops = { .start = lmv_tgt_seq_start, .stop = lmv_tgt_seq_stop, .next = lmv_tgt_seq_next,
@@ -215,7 +216,7 @@ static struct lprocfs_vars lprocfs_lmv_module_vars[] = { { NULL } }; -struct file_operations lmv_proc_target_fops = { +static const struct file_operations lmv_proc_target_fops = { .owner =THIS_MODULE , .open = lmv_target_seq_open, .read = seq_read,
Signature · 1 line
1.9.1
Greg KH
maintainerQuoted 1 line · Filipe Gonçalves
This patch fixes several coding style issues that were reported by checkpath on
lproc_lmv.c.
What issues?
Be specific.
Also, don't fix more than one "type" of issue in the same patch at the same time.
thanks,
greg k-h