public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] staging - lustre: Fixed coding style issues
@ 2014-09-03 19:33 Filipe Gonçalves
  2014-09-03 19:44 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Filipe Gonçalves @ 2014-09-03 19:33 UTC (permalink / raw)
  To: oleg.drokin, andreas.dilger, gregkh; +Cc: linux-kernel, Filipe Gonçalves

This patch fixes several coding style issues that were reported by checkpath on lproc_lmv.c.

Signed-off-by: Filipe Gonçalves <filipe@codinghighway.com>
---
 drivers/staging/lustre/lustre/lmv/lproc_lmv.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/lustre/lustre/lmv/lproc_lmv.c b/drivers/staging/lustre/lustre/lmv/lproc_lmv.c
index 310df44..ce6c14f 100644
--- a/drivers/staging/lustre/lustre/lmv/lproc_lmv.c
+++ b/drivers/staging/lustre/lustre/lmv/lproc_lmv.c
@@ -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,
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] staging - lustre: Fixed coding style issues
  2014-09-03 19:33 [PATCH 1/1] staging - lustre: Fixed coding style issues Filipe Gonçalves
@ 2014-09-03 19:44 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2014-09-03 19:44 UTC (permalink / raw)
  To: Filipe Gonçalves; +Cc: oleg.drokin, andreas.dilger, linux-kernel

On Wed, Sep 03, 2014 at 08:33:46PM +0100, Filipe Gonçalves wrote:
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-03 19:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-03 19:33 [PATCH 1/1] staging - lustre: Fixed coding style issues Filipe Gonçalves
2014-09-03 19:44 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox