Skip to contentSkip to conversation

staging: lustre: Fix block comments style

PATCH In review Sabin Mihai Rapan 2 participants 6 messages May 16, 2018 – May 21, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/5 staging: lustre: Fix block comments style

This patch fixes the checkpatch.pl warning:

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line

---
 .../staging/lustre/include/uapi/linux/lustre/lustre_idl.h   | 6 ++++--
 .../staging/lustre/include/uapi/linux/lustre/lustre_user.h  | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)
drivers/staging/lustre/include/uapi/linux/lustre/lustre_idl.h +4 -2
index e6016a71ad23..f13138972be2 100644
@@ -1526,9 +1526,11 @@ struct mdt_rec_setattr {
 #define MDS_OPEN_HAS_OBJS    020000000000 /* Just set the EA the obj exist */
 #define MDS_OPEN_NORESTORE  0100000000000ULL /* Do not restore file at open */
 #define MDS_OPEN_NEWSTRIPE  0200000000000ULL /* New stripe needed (restripe or
-					      * hsm restore) */
+					      * hsm restore)
+					      */
 #define MDS_OPEN_VOLATILE   0400000000000ULL /* File is volatile = created
-						unlinked */
+					      * unlinked 
+					      */
 #define MDS_OPEN_LEASE	   01000000000000ULL /* Open the file and grant lease
 					      * delegation, succeed if it's not
 					      * being opened with conflict mode.
drivers/staging/lustre/include/uapi/linux/lustre/lustre_user.h +4 -2
index 2fcfe2b2d365..f0fbe3318db6 100644
@@ -405,7 +405,8 @@ static inline __u32 lov_user_md_size(__u16 stripes, __u32 lmm_magic)
 
 /* Compile with -D_LARGEFILE64_SOURCE or -D_GNU_SOURCE (or #define) to
  * use this.  It is unsafe to #define those values in this header as it
- * is possible the application has already #included <sys/stat.h>. */
+ * is possible the application has already #included <sys/stat.h>.
+ */
 #ifdef HAVE_LOV_USER_MDS_DATA
 #define lov_user_mds_data lov_user_mds_data_v1
 struct lov_user_mds_data_v1 {
@@ -468,7 +469,8 @@ struct ll_fid {
 	__u64 id;	 /* holds object id */
 	__u32 generation; /* holds object generation */
 	__u32 f_type;     /* holds object type or stripe idx when passing it to
-			   * OST for saving into EA. */
+			   * OST for saving into EA.
+			   */
 };
 
 #define UUID_MAX	40
Signature · 1 line
2.17.0
maintainer
#1 lore raw
Quoted 15 lines · Sabin Mihai Rapan

This patch fixes the checkpatch.pl warning:

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line

---
 .../staging/lustre/include/uapi/linux/lustre/lustre_idl.h   | 6 ++++--
 .../staging/lustre/include/uapi/linux/lustre/lustre_user.h  | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)
drivers/staging/lustre/include/uapi/linux/lustre/lustre_idl.h +0 -0
index e6016a71ad23..f13138972be2 100644

drivers/staging/lustre/include/uapi/linux/lustre/lustre_idl.h struct mdt_rec_setattr { · line 1533

Quoted 10 lines
drivers/staging/lustre/include/uapi/linux/lustre/lustre_idl.h +4 -2
@@ -1526,9 +1526,11 @@ struct mdt_rec_setattr {
 #define MDS_OPEN_HAS_OBJS    020000000000 /* Just set the EA the obj exist */
 #define MDS_OPEN_NORESTORE  0100000000000ULL /* Do not restore file at open */
 #define MDS_OPEN_NEWSTRIPE  0200000000000ULL /* New stripe needed (restripe or
-					      * hsm restore) */
+					      * hsm restore)
+					      */
 #define MDS_OPEN_VOLATILE   0400000000000ULL /* File is volatile = created
-						unlinked */
+					      * unlinked 
+					      */

Always run checkpatch.pl on your patches so you do not get grumpy maintainers telling you to run checkpatch.pl on your patches :)

Also, do not create a patch to fix up a checkpatch warning, only to have it add another one, unless you want to have an eternal number of changes to make over time...

Please fix up and resend the whole series.

thanks,

greg k-h

#2 lore raw

PATCH 1/4 staging: lustre: Fix "from from"->"from"

Trivial fix to spelling mistake in README.txt

---
 drivers/staging/lustre/README.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/README.txt +1 -1
index 0676243eea9e..783959240490 100644
@@ -4,7 +4,7 @@ Lustre Parallel Filesystem Client
 The Lustre file system is an open-source, parallel file system
 that supports many requirements of leadership class HPC simulation
 environments.
-Born from from a research project at Carnegie Mellon University,
+Born from a research project at Carnegie Mellon University,
 the Lustre file system is a widely-used option in HPC.
 The Lustre file system provides a POSIX compliant file system interface,
 can scale to thousands of clients, petabytes of storage and
Signature · 1 line
2.17.0
#3 lore raw

PATCH 2/4 staging: lustre: Fix "Possible intergrate"->"Possibly integrate"

In reply to Greg KH

Trivial fix to spelling mistake in TODO file.

---
 drivers/staging/lustre/TODO | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/TODO +1 -1
index 94446487748a..5332cdb19bfa 100644
@@ -12,7 +12,7 @@ addressed:
 * https://jira.hpdd.intel.com/browse/LU-9859
 *
 * Track all the cleanups and simplification of the libcfs module. Remove
-* functions the kernel provides. Possible intergrate some of the functionality
+* functions the kernel provides. Possibly integrate some of the functionality
 * into the kernel proper.
 *
 ******************************************************************************
Signature · 1 line
2.17.0
#4 lore raw

PATCH 3/4 staging: lustre: Fix "unsigned"->"unsigned int"

In reply to Greg KH

This patch fixes the checkpatch.pl warning:

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'

---
 .../staging/lustre/include/uapi/linux/lustre/lustre_fiemap.h    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/include/uapi/linux/lustre/lustre_fiemap.h +1 -1
index f5214dc33c60..d375a476f5ea 100644
@@ -51,7 +51,7 @@ static inline size_t fiemap_count_to_size(size_t extent_count)
 				       sizeof(struct fiemap_extent);
 }
 
-static inline unsigned fiemap_size_to_count(size_t array_size)
+static inline unsigned int fiemap_size_to_count(size_t array_size)
 {
 	return (array_size - sizeof(struct fiemap)) /
 		sizeof(struct fiemap_extent);
Signature · 1 line
2.17.0
#5 lore raw

PATCH v2 4/4 staging: lustre: Fix block comments style

In reply to Greg KH

This patch fixes the checkpatch.pl warning:

WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line

---
Changes in v2:
- Removed trailing whitespace at lustre_idl.h:1532.

 .../staging/lustre/include/uapi/linux/lustre/lustre_idl.h   | 6 ++++--
 .../staging/lustre/include/uapi/linux/lustre/lustre_user.h  | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)
drivers/staging/lustre/include/uapi/linux/lustre/lustre_idl.h +4 -2
index aac98dbcf6e3..8a7301a76122 100644
@@ -1526,9 +1526,11 @@ struct mdt_rec_setattr {
 #define MDS_OPEN_HAS_OBJS    020000000000 /* Just set the EA the obj exist */
 #define MDS_OPEN_NORESTORE  0100000000000ULL /* Do not restore file at open */
 #define MDS_OPEN_NEWSTRIPE  0200000000000ULL /* New stripe needed (restripe or
-					      * hsm restore) */
+					      * hsm restore)
+					      */
 #define MDS_OPEN_VOLATILE   0400000000000ULL /* File is volatile = created
-						unlinked */
+					      * unlinked
+					      */
 #define MDS_OPEN_LEASE	   01000000000000ULL /* Open the file and grant lease
 					      * delegation, succeed if it's not
 					      * being opened with conflict mode.
drivers/staging/lustre/include/uapi/linux/lustre/lustre_user.h +4 -2
index 5e332e3af68a..69387f36d1f1 100644
@@ -405,7 +405,8 @@ static inline __u32 lov_user_md_size(__u16 stripes, __u32 lmm_magic)
 
 /* Compile with -D_LARGEFILE64_SOURCE or -D_GNU_SOURCE (or #define) to
  * use this.  It is unsafe to #define those values in this header as it
- * is possible the application has already #included <sys/stat.h>. */
+ * is possible the application has already #included <sys/stat.h>.
+ */
 #ifdef HAVE_LOV_USER_MDS_DATA
 #define lov_user_mds_data lov_user_mds_data_v1
 struct lov_user_mds_data_v1 {
@@ -468,7 +469,8 @@ struct ll_fid {
 	__u64 id;	 /* holds object id */
 	__u32 generation; /* holds object generation */
 	__u32 f_type;     /* holds object type or stripe idx when passing it to
-			   * OST for saving into EA. */
+			   * OST for saving into EA.
+			   */
 };
 
 #define UUID_MAX	40
Signature · 1 line
2.17.0