Skip to contentSkip to conversation

Staging: lustre: Used "linux" instead of "asm"

PATCH New aybuke ozdemir 1 participant 3 messages Feb 20, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 Staging: lustre: Used "linux" instead of "asm"

This patch fixes "Use #include <linux/uaccess.h> instead of <asm/uaccess.h"> checkpatch.pl warning in dir.c

---
 drivers/staging/lustre/lustre/llite/dir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/llite/dir.c +1 -1
index a182019..cb632a1 100644
@@ -41,7 +41,7 @@
 #include <linux/fs.h>
 #include <linux/pagemap.h>
 #include <linux/mm.h>
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 #include <linux/buffer_head.h>   /* for wait_on_buffer */
 #include <linux/pagevec.h>
 #include <linux/prefetch.h>
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/3 Staging: lustre: Add blank line after variable declarations

This patch fixes "Missing a blank line after declarations" checkpatch.pl warning in dir.c

---
 drivers/staging/lustre/lustre/llite/dir.c | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/lustre/lustre/llite/dir.c +1 -0
index cb632a1..2b74824 100644
@@ -1518,6 +1518,7 @@ out_rmdir:
 			lump = (struct lov_user_md *)arg;
 		} else {
 			struct lov_user_mds_data *lmdp;
+
 			lmdp = (struct lov_user_mds_data *)arg;
 			lump = &lmdp->lmd_lmm;
 		}
Signature · 1 line
1.9.1
#2 lore raw

PATCH 3/3 Staging: lustre: Edit switch-case indent

In reply to aybuke ozdemir

This patch fixes indent as the codingStyle of the kernel recommends in dir.c
Fix checkpatch.pl error:
ERROR: switch and case should be at the same indent.

---
 drivers/staging/lustre/lustre/llite/dir.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)
drivers/staging/lustre/lustre/llite/dir.c +14 -14
index 2b74824..a5bc694 100644
@@ -1910,21 +1910,21 @@ static loff_t ll_dir_seek(struct file *file, loff_t offset, int origin)
 
 	mutex_lock(&inode->i_mutex);
 	switch (origin) {
-		case SEEK_SET:
-			break;
-		case SEEK_CUR:
-			offset += file->f_pos;
-			break;
-		case SEEK_END:
-			if (offset > 0)
-				goto out;
-			if (api32)
-				offset += LL_DIR_END_OFF_32BIT;
-			else
-				offset += LL_DIR_END_OFF;
-			break;
-		default:
+	case SEEK_SET:
+		break;
+	case SEEK_CUR:
+		offset += file->f_pos;
+		break;
+	case SEEK_END:
+		if (offset > 0)
 			goto out;
+		if (api32)
+			offset += LL_DIR_END_OFF_32BIT;
+		else
+			offset += LL_DIR_END_OFF;
+		break;
+	default:
+		goto out;
 	}
 
 	if (offset >= 0 &&
Signature · 1 line
1.9.1