Skip to contentSkip to conversation

staging: lustre: Fix trivial checkpatch warnings

PATCH In review Sabin Mihai Rapan 2 participants 2 messages May 12, 2018 – May 14, 2018

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

PATCH 2/2 staging: lustre: Fix trivial checkpatch warnings

Trivial fix to multiple errors and warnings in the lustre headers.

---
 .../lustre/include/linux/libcfs/libcfs_cpu.h  |  2 +-
 .../lustre/include/uapi/linux/lnet/lnet-dlc.h |  4 +-
 .../include/uapi/linux/lnet/lnet-types.h      |  4 +-
 .../lustre/include/uapi/linux/lnet/lnetctl.h  |  2 +-
 .../lustre/include/uapi/linux/lnet/nidstr.h   |  2 +-
 .../include/uapi/linux/lustre/lustre_cfg.h    |  2 +-
 .../include/uapi/linux/lustre/lustre_fiemap.h |  2 +-
 .../include/uapi/linux/lustre/lustre_idl.h    | 45 +++++++++++--------
 .../include/uapi/linux/lustre/lustre_ioctl.h  |  2 +-
 .../include/uapi/linux/lustre/lustre_ostid.h  |  2 +-
 .../include/uapi/linux/lustre/lustre_user.h   |  8 ++--
 11 files changed, 42 insertions(+), 33 deletions(-)
drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h +1 -1
index 813ba4564bb9..45aa6ae8380d 100644
@@ -90,7 +90,6 @@ struct cfs_cpu_partition {
 	unsigned int			cpt_spread_rotor;
 };
 
-
 /** descriptor for CPU partitions */
 struct cfs_cpt_table {
 	/* version, reserved for hotplug */
@@ -225,6 +224,7 @@ cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len)
 {
 	return 0;
 }
+
 static inline int
 cfs_cpt_number(struct cfs_cpt_table *cptab)
 {
drivers/staging/lustre/include/uapi/linux/lnet/lnet-dlc.h +2 -2
index c1619f411d81..1530ac26b449 100644
@@ -29,8 +29,8 @@
 #ifndef LNET_DLC_H
 #define LNET_DLC_H
 
-#include <uapi/linux/lnet/libcfs_ioctl.h>
-#include <uapi/linux/lnet/lnet-types.h>
+#include "libcfs_ioctl.h"
+#include "lnet-types.h"
 
 #define MAX_NUM_SHOW_ENTRIES	32
 #define LNET_MAX_STR_LEN	128
drivers/staging/lustre/include/uapi/linux/lnet/lnet-types.h +2 -2
index 1be9b7aa7326..401a08920195 100644
@@ -298,7 +298,7 @@ static inline void LNetInvalidateEQHandle(struct lnet_handle_eq *h)
  */
 static inline int LNetEQHandleIsInvalid(struct lnet_handle_eq h)
 {
-	return (LNET_WIRE_HANDLE_COOKIE_NONE = h.cookie);
+	return (h.cookie = LNET_WIRE_HANDLE_COOKIE_NONE);
 }
 
 struct lnet_handle_md {
@@ -320,7 +320,7 @@ static inline void LNetInvalidateMDHandle(struct lnet_handle_md *h)
  */
 static inline int LNetMDHandleIsInvalid(struct lnet_handle_md h)
 {
-	return (LNET_WIRE_HANDLE_COOKIE_NONE = h.cookie);
+	return (h.cookie = LNET_WIRE_HANDLE_COOKIE_NONE);
 }
 
 struct lnet_handle_me {
drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h +1 -1
index cccb32dd28f2..c7be86610cc0 100644
@@ -15,7 +15,7 @@
 #ifndef _LNETCTL_H_
 #define _LNETCTL_H_
 
-#include <uapi/linux/lnet/lnet-types.h>
+#include "lnet-types.h"
 
 /** \addtogroup lnet_fault_simulation
  * @{
drivers/staging/lustre/include/uapi/linux/lnet/nidstr.h +1 -1
index 882074ed6021..d153c97ea64d 100644
@@ -28,7 +28,7 @@
 #ifndef _LNET_NIDSTRINGS_H
 #define _LNET_NIDSTRINGS_H
 
-#include <uapi/linux/lnet/lnet-types.h>
+#include "lnet-types.h"
 
 /**
  *  Lustre Network Driver types.
drivers/staging/lustre/include/uapi/linux/lustre/lustre_cfg.h +1 -1
index 11b51d93f64c..a1dc912af960 100644
@@ -35,7 +35,7 @@
 
 #include <linux/errno.h>
 #include <linux/kernel.h>
-#include <uapi/linux/lustre/lustre_user.h>
+#include "lustre_user.h"
 
 /** \defgroup cfg cfg
  *
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);
drivers/staging/lustre/include/uapi/linux/lustre/lustre_idl.h +26 -19

119 lines not on this page · raw message

drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h +1 -1
index 6e4e109fb874..54e8fbbe98c4 100644
@@ -31,7 +31,7 @@
 #include <linux/ioctl.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
-#include <uapi/linux/lustre/lustre_idl.h>
+#include "lustre_idl.h"
 
 #if !defined(__KERNEL__) && !defined(LUSTRE_UTILS)
 # error This file is for Lustre internal use only.
drivers/staging/lustre/include/uapi/linux/lustre/lustre_ostid.h +1 -1
index 3343b602219b..9110229b0886 100644
@@ -35,7 +35,7 @@
 #define _UAPI_LUSTRE_OSTID_H_
 
 #include <linux/errno.h>
-#include <uapi/linux/lustre/lustre_fid.h>
+#include "lustre_fid.h"
 
 static inline __u64 lmm_oi_id(const struct ost_id *oi)
 {
drivers/staging/lustre/include/uapi/linux/lustre/lustre_user.h +5 -3
index 5e332e3af68a..f0fbe3318db6 100644
@@ -55,7 +55,7 @@
 # include <sys/quota.h>
 # include <sys/stat.h>
 #endif /* __KERNEL__ */
-#include <uapi/linux/lustre/lustre_fiemap.h>
+#include "lustre_fiemap.h"
 
 /*
  * We need to always use 64bit version because the structure
@@ -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 1 line · Sabin Mihai Rapan

Trivial fix to multiple errors and warnings in the lustre headers.

Please be specific as to what you are fixing. This should be broken up into "one patch per logical change". Please fix up and resend the whole series.

thanks,

greg k-h